private void LoadLanguage(GameData.Languages newLanguage) { if (m_localizations == null) { ReadLocalizations(); } m_localization = m_localizations[(int)newLanguage]; }
public void ChangeLanguage(GameData.Languages newLanguage) { SetLanguageFont(newLanguage.ToString().ToLowerInvariant()); LoadLanguage((GameData.Languages)currentFont); int count = m_iLabels.Count; for (int i = 0; i < count; i++) { m_iLabels[i].Restart(); } }
public override void Awake() { base.Awake(); RestartLabelLists(); m_localization = new Dictionary <string, string>(); GameData.Languages lang = GameData.Languages.English; for (int i = 0; i < font.Count; i++) { if (font[i].name.ToString().ToLower() == Application.systemLanguage.ToString().ToLower()) { lang = (GameData.Languages)i; } } if (PlayerPrefs.GetInt("Language") != -1) { lang = (GameData.Languages)PlayerPrefs.GetInt("Language"); } ChangeLanguage(lang); }