root/trunk/core/gui_lang.c
Enhancement for the language string handling from tsvstar & philmoz. - Language strings compiled into CHDK core are now generated during build from the .lng file in CHDK/LANG. Defaults to english.lng; but can be overridden in buildconf.inc or localbuildconf.inc to build a custom version of CHDK with a different native language compiled in. Saves space by not loading both english and the selected language at startup. - Cleanup of the english.lng file.
#include "conf.h"
#include "lang.h"
#include "gui_lang.h"
//-------------------------------------------------------------------
// String list now is generated automatically from .lng files
// Please add new lines directly to english.lng and please try to keep ids serial
#include "gui_lang_str.h"
//-------------------------------------------------------------------
void gui_lang_init() {
// this function do init and then map preparsed
lang_map_preparsed_from_mem( gui_lang_default, GUI_LANG_ITEMS );
if (conf.lang_file && *conf.lang_file) {
lang_load_from_file(conf.lang_file);
}
}
//------------------------------------------------------------------- |
