示例#1
0
    public void TestChange()
    {
        LanguageSetting languageSetting = new LanguageSetting();
        SystemLanguage  systemLanguage  = Application.systemLanguage;

        languageSetting.ChangeLanguage(EnumLaungageSetting.EN);
        Assert.AreEqual(EnumLaungageSetting.EN, languageSetting.GetLanguage());
        languageSetting.ChangeLanguage(EnumLaungageSetting.JP);
        Assert.AreEqual(EnumLaungageSetting.JP, languageSetting.GetLanguage());
    }
示例#2
0
    public void TestDefault()
    {
        PlayerPrefs.SetInt(LanguageSetting.PREFS_KEY, LanguageSetting.NO_SETTING_LANGUAGE);

        LanguageSetting languageSetting = new LanguageSetting();
        SystemLanguage  systemLanguage  = Application.systemLanguage;

        if (systemLanguage == SystemLanguage.Japanese)
        {
            Assert.AreEqual(EnumLaungageSetting.JP, languageSetting.GetLanguage());
        }
        else
        {
            Assert.AreEqual(EnumLaungageSetting.EN, languageSetting.GetLanguage());
        }
    }
示例#3
0
 protected string GetStyleSheet()
 {
     return(@"<link rel='stylesheet' type='text/css' href='" + Application["rootPath"] + "/StyleSheet/" + LanguageSetting.GetLanguage() + "_MASTERPAGE.css' />");
     // @"<link rel='stylesheet' type='text/css' href='../StyleSheet/" + LanguageSetting.GetLanguage() + "_MASTERPAGE.css' />";
 }
示例#4
0
 protected string __()
 {
     return(LanguageSetting.GetLanguage());
 }