-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LINUX localization? #5569
Comments
Thanks for reporting this, but AFAIK the default locale depends on the OS, but I may have a look to this one |
@pgy866 Can you debug and tell me if the OS returns a culture from the PR. |
@Skrypt Deployed in Linux, Recipe "SaaS", after installation, the display language is the system language zh-CN; However, in the localization settings, there is no "zh-cn" is added as in Windows deployment. In the settings list, delete or re-add zh-cn. In Linux, because the default "zh-cn" has been applied, it cannot be deleted and selected in the list. Therefore, after changing the language, it cannot be changed back to "zh-cn"。 Sorry, English is very bad. I use Google Machine Translation, I hope you understand。 |
@Skrypt Use "" 2020-02-19T01: 24: 35Z "to build the latest source code. Sorry because of language problems, I posted a few pictures, it should be easier to understand. <<<操作系统uos 20 Linux 4.19.0-6-amd64 (Debian 8.3.0-6) #1 SMP Uos 4.19.67-7deepin (2020-01-11>>> <<<windows_Server_2019_datacenter>>> |
Here this is what I get from a fresh install in Windows 10. So actually it has nothing to do with TimeZones. It just doesn't find a default system culture. That's really strange. Ok so if you look at the culture list in Windows there is zh, zh-CN and zh-Hans. zh-Hans and zh-CN are both simplified chinese. Here your website is only getting translated in simplified chinese when you set it to "zh" because your browser only has "zh" in it's allowed culture list. For "zh-CN" to work you need to add "zh-CN" to the browser culture settings. Here the issue is that most people won't have "zh-CN" as a culture in their browser. So, renaming the "zh-CN" folder to "zh" is the appropriate thing to do if you want to support this culture generally. You could also install both culture and keep the "zh" folder and it would take this folder for "zh-CN" translations. Though, since "zh-CN" is a child timezone it doesn't work the other way around. The other option is to create your own implementation of a AcceptLanguageHeaderRequestCultureProvider to change this behavior and always fallback to "zh-CN" if you always want to be specific about the culture the website should use even if a Browser accepts only "zh". Also, from one OS to an other the culture list can be different because these cultures are basically taken from the OS on startup of dotnet core and set in it's runtime cache. |
Ok so in Windows, it works like it is expected to as I can see in this last screenshot. |
Now looking at the videos more and the OS is returning you "zh-CN" as the default culture but it's not in the culture list. That's why it sets "zh-CN" as the default culture but doesn't actually add it as a culture in that list of supported culture in the admin UI. The strange part about this is the fact that then it means that your default culture is a culture not listed in your OS cultures. And also we can clearly see that "zh-CN" is listed as "zh-Hans-CN". |
Here I took a screenshot from a Ubuntu docker image : The same issue exist. After setup it added the "invariant culture" as the default culture of the website since it did not find any default culture from the OS. After that if we look in that culture list. "zh-CN" is listed as "zh-Hans-CN". I need to look if we can find something like canonical culture names in .NET Core. |
Here some reading |
Moved to #5595 |
There is no localization in LINUX by default, changing the language has no effect.


Localization in windows adds the current language list by default
The text was updated successfully, but these errors were encountered: