static public string getContent(string id, IsoLanguages filterLang, bool warning = true) { if (manager == null) { manager = create(); } LocalizationFile file = manager.getFileByLang(filterLang.ToString()); Debug.Assert(file != null, "no file found for language : " + filterLang); return(file.getContentById(id, warning)); }
static public string getContent(string id, bool warning = false) { if (manager == null) { manager = create(); } IsoLanguages lang = getSavedIsoLanguage(); LocalizationFile file = manager.getFileByLang(lang.ToString()); Debug.Assert(file != null, "no file found for language : " + lang); return(file.getContentById(id, warning)); }
/// <summary> /// A apl quand on change la lang /// </summary> static public void applyLanguage(IsoLanguages newLang) { Debug.Log("<color=cyan>applyLanguage</color> to <b>" + newLang + "</b>!"); IsoLanguages iso = getSavedIsoLanguage(); if (!Application.isPlaying) { reacts.Clear(); reacts.AddRange(HalperInterfaces.getCandidates <iLanguageChangeReact>()); } Debug.Log("applying new lang (" + iso + ") to x" + reacts.Count + " reacts"); for (int i = 0; i < reacts.Count; i++) { reacts[i].onLanguageChange(iso.ToString()); } }
public LocalizationFile(IsoLanguages lang) { Init(lang.ToString()); }
static public string isoToLabel(IsoLanguages lang) { return(getContent("menu_" + lang.ToString())); }