Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

cultureinfo in Views is always "en-Us" despite in controller CurrentCulture is different. I'm using rc2 #4692

@NGancevich

Description

@NGancevich

I have the following supported cultures.

var supportedCultures = new CultureInfo[]
            {
                new CultureInfo("be-By"),
                new CultureInfo("en-Gb"),
                new CultureInfo("ru-Ru"),
                new CultureInfo("uk-UA"),
                new CultureInfo("pl-PL"),

            };

            app.UseRequestLocalization(new RequestLocalizationOptions
            {
                SupportedCultures = supportedCultures,
                SupportedUICultures = supportedCultures,

                RequestCultureProviders = new List<IRequestCultureProvider>
                {
                    new QueryStringRequestCultureProvider { },
                    new CookieRequestCultureProvider { CookieName = "CULTURE"},

                },

                //DefaultRequestCulture = new RequestCulture(new CultureInfo("en-Gb"))

            });

In controller is see {be-BY} for System.Threading.Thread.CurrentThread.CurrentCulture but View displays {en-Us}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions