public void LoadCaptionLanguage() { string t_language = ShabbySave.LoadGame(Constants.SAVE_CATEGORY_SETTINGS, Constants.SAVE_TITLE_LANGUAGE); if (t_language == "0") { // set default language // TODO: switch (Application.systemLanguage) { // case SystemLanguage.ChineseSimplified: // t_language = Constants.LANGUAGE_CHS; // break; // case SystemLanguage.ChineseTraditional: // t_language = Constants.LANGUAGE_CHT; // break; // case SystemLanguage.Chinese: // t_language = Constants.LANGUAGE_CHS; // break; case SystemLanguage.English: myLanguage = Language.EN; break; default: myLanguage = Language.EN; break; } ShabbySave.SaveGame(Constants.SAVE_CATEGORY_SETTINGS, Constants.SAVE_TITLE_LANGUAGE, myLanguage.ToString()); } else { myLanguage = (Language)System.Enum.Parse(typeof(Language), t_language); } Debug.Log("load caption language : " + myLanguage); xmlDoc = new XmlDocument(); xmlDoc.LoadXml(Resources.Load <TextAsset> (Constants.PATH_LANGUAGE + "Caption_" + myLanguage.ToString()).ToString()); }
public void SetCaptionLanguage(string g_language) { ShabbySave.SaveGame(Constants.SAVE_CATEGORY_SETTINGS, Constants.SAVE_TITLE_LANGUAGE, g_language); }