Exemplo n.º 1
0
        /// <inheritdoc/>
        public LocalizationScope BeginScope()
        {
            var scope = LocalizationScope.FromCurrentThread();

            // TODO: We need to be able to configure culture for the application
            //CultureInfo.CurrentCulture = Configure.Instance.Culture;
            //CultureInfo.CurrentUICulture = Configure.Instance.UICulture;

            return(scope);
        }
 /// <inheritdoc/>
 public void EndScope(LocalizationScope scope)
 {
     CultureInfo.CurrentCulture   = scope.Culture;
     CultureInfo.CurrentUICulture = scope.UICulture;
 }
 /// <inheritdoc/>
 public LocalizationScope BeginScope()
 {
     return(LocalizationScope.FromCurrentThread());
 }
        /// <summary>
        /// Get current <see cref="LocalizationScope"/> from the current thread.
        /// </summary>
        /// <returns>A new <see cref="LocalizationScope"/> instance.</returns>
        public static LocalizationScope FromCurrentThread()
        {
            var scope = new LocalizationScope(CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture);

            return(scope);
        }