0
zhongfang created
My clients want to look Chinese UI, while they touch my web application.
How to do ?
- ABP Framework version: v5.1.1
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
2 Answer(s)
-
0
Hi @zhongfang, you can update your
UseAbpRequestLocalization
middleware (under your *.HttpApiHostModule) as follows://list your supported cultures var supportedCultures = new[] { new CultureInfo("zh-Hans"), new CultureInfo("cs"), new CultureInfo("en"), new CultureInfo("tr"), //... }; app.UseAbpRequestLocalization(options => { options.DefaultRequestCulture = new RequestCulture("zh-Hans"); //set default as zh-Hans options.SupportedCultures = supportedCultures; options.SupportedUICultures = supportedCultures; options.RequestCultureProviders = new List<IRequestCultureProvider> { // there are three culture providers new QueryStringRequestCultureProvider(), new CookieRequestCultureProvider(), new AcceptLanguageHeaderRequestCultureProvider() }; });
https://github.com/abpframework/abp/issues/2775 https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-6.0#localization-middleware
-
0
I found many result articles by search Google and Baidu. And I tried out them. But I failed.
Now, you resolved my question.
Thank you.
Maybe you can add above content to UserGuide.