Пример #1
0
        /// <summary>
        /// Get current <see cref="LocalizationScope"/> from the current thread
        /// </summary>
        /// <returns></returns>
        public static LocalizationScope FromCurrentThread()
        {
            var culture = new CultureInfo(Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride);
            var scope   = new LocalizationScope(culture, culture);

            return(scope);
        }
Пример #2
0
#pragma warning disable 1591 // Xml Comments
        public LocalizationScope BeginScope()
        {
            var scope = LocalizationScope.FromCurrentThread();

            Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = Configure.Instance.Culture.Name;

            return(scope);
        }
Пример #3
0
#pragma warning disable 1591 // Xml Comments
        public LocalizationScope BeginScope()
        {
            var scope = LocalizationScope.FromCurrentThread();

            CultureInfo.CurrentCulture   = Configure.Instance.Culture;
            CultureInfo.CurrentUICulture = Configure.Instance.UICulture;

            return(scope);
        }
Пример #4
0
		public void EndScope(LocalizationScope scope)
		{
			Thread.CurrentThread.CurrentCulture = scope.Culture;
			Thread.CurrentThread.CurrentUICulture = scope.UICulture;
        }
Пример #5
0
        /// <summary>
        /// Get current <see cref="LocalizationScope"/> from the current thread
        /// </summary>
        /// <returns></returns>
		public static LocalizationScope	FromCurrentThread()
		{
			var scope = new LocalizationScope(Thread.CurrentThread.CurrentCulture, Thread.CurrentThread.CurrentUICulture);
			return scope;
		}
Пример #6
0
        /// <summary>
        /// Get current <see cref="LocalizationScope"/> from the current thread
        /// </summary>
        /// <returns></returns>
        public static LocalizationScope FromCurrentThread()
        {
            var scope = new LocalizationScope(Thread.CurrentThread.CurrentCulture, Thread.CurrentThread.CurrentUICulture);

            return(scope);
        }
Пример #7
0
 public void EndScope(LocalizationScope scope)
 {
     Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = scope.Culture.Name;
 }
Пример #8
0
 public void EndScope(LocalizationScope scope)
 {
     Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = scope.Culture.Name;
 }
Пример #9
0
 /// <summary>
 /// Get current <see cref="LocalizationScope"/> from the current thread
 /// </summary>
 /// <returns></returns>
 public static LocalizationScope FromCurrentThread()
 {
     var culture = new CultureInfo(Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride);
     var scope = new LocalizationScope(culture, culture);
     return scope;
 }
Пример #10
0
 public void EndScope(LocalizationScope scope)
 {
     CultureInfo.CurrentCulture   = scope.Culture;
     CultureInfo.CurrentUICulture = scope.UICulture;
 }
Пример #11
0
 public void EndScope(LocalizationScope scope)
 {
     Thread.CurrentThread.CurrentCulture   = scope.Culture;
     Thread.CurrentThread.CurrentUICulture = scope.UICulture;
 }