Inheritance: ITimeFormat
コード例 #1
0
        private void LoadStringKeys()
        {
            var resPrefix    = GetResourcePrefix();
            var pattern      = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "Pattern");
            var futurePrefix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "FuturePrefix");
            var futureSuffix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "FutureSuffix");
            var pastPrefix   = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PastPrefix");
            var pastSuffix   = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PastSuffix");

            Name       = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "Name");
            PluralName = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PluralName");

            Format = new BasicTimeFormat().SetPattern(pattern)
                     .SetFuturePrefix(futurePrefix)
                     .SetFutureSuffix(futureSuffix)
                     .SetPastPrefix(pastPrefix)
                     .SetPastSuffix(pastSuffix);
        }
コード例 #2
0
        private void LoadStringKeys()
        {
            var resPrefix = GetResourcePrefix();
            var pattern = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "Pattern");
            var futurePrefix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "FuturePrefix");
            var futureSuffix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "FutureSuffix");
            var pastPrefix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PastPrefix");
            var pastSuffix = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PastSuffix");

            Name = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "Name");
            PluralName = LocalizeManager.GetLocalizer().GetFormatterString(resPrefix + "PluralName");

            Format = new BasicTimeFormat().SetPattern(pattern)
                                          .SetFuturePrefix(futurePrefix)
                                          .SetFutureSuffix(futureSuffix)
                                          .SetPastPrefix(pastPrefix)
                                          .SetPastSuffix(pastSuffix);
        }