void download_lang_files(void){ int i; for (i = 0; i < languages_count; i++){ if (strcmp(lang_values[i], roadmap_lang_get_system_lang())) roadmap_lang_download_lang_file(lang_values[i], NULL); } }
void roadmap_lang_login_cb(void){ if (LangNextLoginCb) { LangNextLoginCb (); LangNextLoginCb = NULL; } roadmap_lang_download_lang_file(roadmap_lang_get_system_lang(), NULL); roadmap_lang_download_conf_file(NULL); }
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); }
static void on_recieved_completed (void) { char updateText[] = "We've made a few infrastructural changes that require re-start. Please exit and re-start waze."; const char *user_lang = roadmap_lang_get_user_lang();//"heb";//todomt const char *force_lang = roadmap_config_get( &RoadMapConfigForceLanguage); // compare the old and new server id's - if different, user needs to restart int oldServerId = roadmap_config_get_integer(&RoadMapConfigSystemServerId); int newServerId = GeoConfigContext.id; // Save the RT server ID. roadmap_config_set_integer (&RoadMapConfigSystemServerId, GeoConfigContext.id); #ifndef J2ME // in J2ME don't download the language until user chooses it manually // TODODAN //set the language if (!strcmp(force_lang, "")){ roadmap_lang_set_system_lang (GeoConfigContext.lang, NULL); }else{ roadmap_lang_set_system_lang (force_lang, NULL); } #endif // Save version roadmap_config_set_integer (&RoadMapConfigGeoConfigVersion, GeoConfigContext.version); //Save new configuration roadmap_config_save (0); //Remove timer roadmap_main_remove_periodic (GeoConfigTimer); roadmap_log (ROADMAP_DEBUG,"GeoServerConfig Completed setting all parameters!!" ); roadmap_log (ROADMAP_INFO, "GeoServerConfig: user_lang='%s' newServerId=%d", user_lang, newServerId ); if ((user_lang[0] == 0) && (newServerId != 2)){ roadmap_lang_download_conf_file(on_lang_conf_downloaded); return; } if ((user_lang[0] == 0) && (newServerId == 2)){ roadmap_lang_set_system_lang(GeoConfigContext.lang, NULL); } if ((oldServerId==-1)){ ssd_progress_msg_dialog_show("Downloading language"); roadmap_lang_download_lang_file(roadmap_lang_get_system_lang(), on_user_lang_downloaded); //on_user_lang_downloaded();//todomt return; } #ifndef J2ME roadmap_lang_download_lang_file(GeoConfigContext.lang, NULL); #endif ssd_progress_msg_dialog_hide(); clean_up(); roadmap_screen_refresh(); if (GeoConfigContext.callback) (*GeoConfigContext.callback)(); GeoConfigContext.callback = NULL; // if ((oldServerId!=newServerId)&&(oldServerId!=-1)){ // // roadmap_lang_set_update_time(""); //#ifndef J2ME // roadmap_lang_set_lang_file_update_time("heb",""); // roadmap_lang_set_lang_file_update_time("eng",""); //#endif // roadmap_prompts_set_update_time (""); // roadmap_splash_set_update_time (""); // roadmap_splash_reset_check_time(); // roadmap_config_save(FALSE); //#if (defined (IPHONE) || defined (ANDROID)) // roadmap_tile_remove_all(roadmap_locator_active()); //#endif // roadmap_messagebox_cb(roadmap_lang_get("Please restart Waze"), roadmap_lang_get(updateText), restart_msg_cb); // } }