Problem setting default language to pt-BR. #11873
-
I modified the app.UseAbpRequestLocalization() in OnApplicationInitialization on the WebModule Projetct to the following code:
I'm using abp.io version 5.1 and that code is not working for me. I have no idea why. Actually, i've got a weird behavior in my abp application. When I start it without a tenant, it's obey my culture info (pt-BR). But in the login page when I click to switch tenant, the language automatically falls back to english. Obs: I realize that it sets the cookie .AspNetCore.Culture to value c=en|uic=en which would be the english language. But if I open the DevTools in the browser, navigate untill the tab Application and change the cookie value in runtime to c=pt-BR|uic=pt-BR, then it goes to the portuguese language, refresh the page, the it works. Question is, Why when I my culture info works when there's not tenant set, but in the exactly moment I switch the tenant (by the login page) it falls back to english again? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In short, when you add the following code to
|
Beta Was this translation helpful? Give feedback.
-
Thanks, that worked for me. |
Beta Was this translation helpful? Give feedback.
#2469
In short, when you add the following code to
appsettings.json
in addition to what you have done, the problem should be solved.