Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #4
0
		public void EndScope(LocalizationScope scope)
		{
			Thread.CurrentThread.CurrentCulture = scope.Culture;
			Thread.CurrentThread.CurrentUICulture = scope.UICulture;
        }
        /// <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;
		}
Exemple #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);
        }
Exemple #7
0
 public void EndScope(LocalizationScope scope)
 {
     Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = scope.Culture.Name;
 }
Exemple #8
0
 public void EndScope(LocalizationScope scope)
 {
     Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = scope.Culture.Name;
 }
Exemple #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;
 }
Exemple #10
0
 public void EndScope(LocalizationScope scope)
 {
     CultureInfo.CurrentCulture   = scope.Culture;
     CultureInfo.CurrentUICulture = scope.UICulture;
 }
Exemple #11
0
 public void EndScope(LocalizationScope scope)
 {
     Thread.CurrentThread.CurrentCulture   = scope.Culture;
     Thread.CurrentThread.CurrentUICulture = scope.UICulture;
 }