dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: multi-language rockbox version

Re: multi-language rockbox version

From: Daniel Stenberg <>
Date: Tue, 3 Sep 2002 14:51:26 +0200 (MET DST)


> I believe there are multiple ways of choosing the language, but i thought
> that using macros instead of text strings could be a good idea. I mean,
> using the configure script we can define some macros that will let us
> choose some code files that are just for the recorder or the player.

You mean in the style...


...that returns the translated string for "hello world" ? Yes, I believe that
is the way to do it.

This could be fixed right now, and have the get_string() a macro similar to
something like this:

#define get_string(x) x
#define HELLO_WORLD_ID "hello world"
#define BYE_BYTE_WORLD_ID "bye bye world"

It would prepare the code and add no additional run-time penalty.

(Yes, they should probably have better names but you might get my drift

> The same way, i have changed all text strings at the code into macros, and
> have defined this macros in a header file for each language.

My opinion:

The translated strings should be in in some kind of meta-data file that the
translators hack on, patch, diff, etc. Then we have tools that generate the
arrays and lists of defines or whatever we deem necessary.

I've already suggested my meta-file format.

> Changing each string (just those that need to be translated)

All strings (that are not pure debug strings) that are english today should
of course be possible to translate. Otherwise we wouldn't do a complete job.

> in the code is a really *boring* work, but once you've done it, you can add
> all languages, just by writing a new header file and changing the english
> text with the translated text, and including the option at the language
> selection conditional.

The changed code should be language-agnostic and again, we should not write
translations in source files. I've been involved in too many projects when
translations are done that way and it never turns out like a good way. It
gives us more work and a worse end-result.

Daniel "Bagder" Stenberg --
Received on 2002-09-03

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