Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: What function loads a .lang file?

Re: What function loads a .lang file?

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Sun, 27 Apr 2003 02:54:14 +0200

TP Diffenbach wrote:
> Well, I'm thinking I'll do it another way anyhow.
>
> But we do have code that assigns pointers to the language strings.
> For example, in settings.c, function set_time

Uh!!! What a bug! We'll have to fix that.

> I wanted to maintain arrays that were subsets of the language_strings
> array, and change mine whenver language_strings was changed.

Why?


> Instead I'm thinking of indexing directly into language_strings.

But that is exactly what the str() macro does. Why not use that?

> Admittly, that fails if the strings in english.lang are reorderd, but
> it doesn't seem to be too much of a burden on maintainers to insist
> that like strings be kept together, and in a certain order.

The current concept depends on the order of the strings. Use the str()
macro and stay out of trouble.

/Linus
Received on 2003-04-27

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy