|
Rockbox mail archiveSubject: Re: .lang filesRe: .lang files
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Mon, 16 Sep 2002 14:05:11 +0200 Florian Mösch wrote: > Aren't those defines resulting in simple text substitutions by the > preprocessor ? No. In the code it will look something like this: ---language.h--- #define LANG_VERSION 0 #define LANG_BROWSE 1 #define str(_x_) lang_strings[_x_] extern unsigned char* lang_strings[]; ---language.c--- unsigned char* lang_strings[] = { "Version", "Browse" }; ---apps/main.c--- lcd_puts(0,0,str(LANG_VERSION)); > How do you plan to implement a run-time version of your design ? We simply link several different arrays (lang_sv, lang_en, lang_fr, lang_de) and then assign the lang_strings pointer to the currently selected one. -- BjörnReceived on 2002-09-16 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |