Rockbox mail archiveSubject: Using and building with the rockbox .lang files
Using and building with the rockbox .lang files
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 16 Sep 2002 11:28:16 +0200 (MET DST)
How's how it will work (and already works in my end):
1. There's a single file for every language we support.
2. We start off with only build-time language selection support. This can
easily be changed to loadable language files in the future.
For now, all sources in Rockbox that uses strings (except for the debug menu)
should include "lang.h" for language stuff.
(This language support is for apps only, the firmware side of the world
should only use english strings and they may be hard-coded or whatever.)
All strings should be accessed with str(ID).
Right now, I get an english rockbox build like this:
$ ./genlang english.lang > lang.h
If I instead want to build my Swedish Rockbox, I do this:
$ ./genlang svenska.lang > lang.h
Now, since the english one is the "mother language" of Rockbox, that is to be
considered the master in this context. So, to make sure that the swedish
language file hasn't run out-of-date due to a couple of new strings that were
added to (or removed from) the english file, I update it:
$ ./uplang english.lang svenska.lang > svenska-upd.lang
Now, I go through the "svenska-upd.lang" file and correct the lines that have
been noted with comments and then I save that file as 'svenska.lang' again
and we're up to date with the english one.
If we wanna build a language of which we have no knowledge, we can instead
use the updated file as source (which then will have english default-phrases
as fallback for the untraslated ones):
$ ./uplang english.lang french.lang > french-upd.lang
$ ./genlang french-upd.lang > lang.h
-- Daniel "Bagder" Stenberg -- http://rockbox.haxx.se/Received on 2002-09-16