Esempio n. 1
0
        public void TestZH_CN_NotExist()
        {
            var    l  = L10NContext.GetLocalization("zh-CN");
            string tr = l.Localize(MSG_BYE);

            Assert.AreEqual(MSG_BYE, tr);
        }
Esempio n. 2
0
        public void TestZH_CN()
        {
            var    l  = L10NContext.GetLocalization("zh-CN");
            string tr = l.Localize(MSG_HELLO);

            Assert.AreEqual("你好", tr);
        }
Esempio n. 3
0
        public void TestEN_US_NotExist()
        {
            var    l  = L10NContext.GetLocalization("en-US");
            string tr = l.Localize(MSG_BYE);

            Assert.AreEqual(MSG_BYE, tr);
        }
Esempio n. 4
0
        public void TestEN_US()
        {
            var    l  = L10NContext.GetLocalization("en-US");
            string tr = l.Localize(MSG_HELLO);

            Assert.AreEqual("Hello", tr);
        }
Esempio n. 5
0
        public void TestBuildFallback()
        {
            var l = L10NContext.GetLocalization("zzzz");

            Assert.AreEqual(Thread.CurrentThread.CurrentCulture.Name, l.CultureInfo.Name);
        }
Esempio n. 6
0
        public void TestBuild()
        {
            var l = L10NContext.GetLocalization("en-US");

            Assert.AreEqual("en-US", l.CultureInfo.Name);
        }