void roadmap_lang_initialize (void) { const char *p; initialized = TRUE; roadmap_log (ROADMAP_INFO, "Starting 'roadmap_lang_initialize'"); roadmap_lang_initialize_params(); roadmap_lang_allocate (); lang_labels[0] = "English"; lang_values[0] = "eng"; p = roadmap_path_user (); LangNextLoginCb = Realtime_NotifyOnLogin (roadmap_lang_login_cb); roadmap_lang_conf_load(roadmap_path_downloads()); RoadMapLangLoaded = roadmap_lang_load (p); if (!RoadMapLangLoaded){ p = roadmap_path_downloads(); RoadMapLangLoaded = roadmap_lang_load (p); } RoadMapLangRTL = (strcasecmp(roadmap_lang_get ("RTL"), "Yes") == 0); NOPH_SetSystemLanguage(roadmap_lang_get_system_lang()); }
void roadmap_lang_set_default_lang(const char *lang){ if (!initialized) roadmap_lang_initialize_params(); roadmap_config_set(&RoadMapConfigDefaultLanguage, lang); roadmap_config_save(0); }
const char *roadmap_lang_get_default_lang(){ if (!initialized) roadmap_lang_initialize_params(); return roadmap_config_get (&RoadMapConfigDefaultLanguage); }
void roadmap_lang_initialize (void) { const char *p; initialized = TRUE; roadmap_lang_initialize_params(); roadmap_lang_allocate (); lang_labels[0] = "English"; lang_values[0] = "eng"; LangNextLoginCb = Realtime_NotifyOnLogin (roadmap_lang_login_cb); roadmap_lang_conf_load(roadmap_path_downloads()); for (p = roadmap_path_first("user"); p != NULL && !RoadMapLangLoaded; p = roadmap_path_next("user", p)) { RoadMapLangLoaded = roadmap_lang_load (p); } RoadMapLangRTL = (strcasecmp(roadmap_lang_get ("RTL"), "Yes") == 0); #ifdef QTMOBILITY roadmap_lang_loaded(); #endif }
void roadmap_lang_set_system_lang(const char *lang, RoadMapCallback callback){ if (!initialized) roadmap_lang_initialize_params(); roadmap_lang_download_lang_file( lang, callback ); roadmap_config_set(&RoadMapConfigSystemLanguage, lang); roadmap_config_save(0); NOPH_SetSystemLanguage(lang); }
void roadmap_lang_set_system_lang(const char *lang, BOOL download){ if (!initialized) roadmap_lang_initialize_params(); if (download) roadmap_lang_download_lang_file( lang, NULL ); roadmap_config_set(&RoadMapConfigSystemLanguage, lang); roadmap_config_save(TRUE); }
const char *roadmap_lang_get_system_lang(){ const char *lang = roadmap_config_get (&RoadMapConfigSystemLanguage); if (!initialized) roadmap_lang_initialize_params(); if (!strcmp(lang,"default")) return roadmap_lang_get_default_lang(); else return lang; }
void roadmap_lang_set_update_time(const char *update_time){ if (!initialized) roadmap_lang_initialize_params(); roadmap_config_set(&RoadMapConfigLangUpdateTime, update_time); }
const char *roadmap_lang_get_update_time(void){ if (!initialized) roadmap_lang_initialize_params(); return roadmap_config_get (&RoadMapConfigLangUpdateTime); }