Skip to content

.NET Core Locale Missing under Linux System #28893

@hajuuk

Description

@hajuuk

When I try to deploy a ASP.NET Core application to a Linux system, I figured out the localization may have some critical issue.

I using following code in .NET Core Console application to isolate the issue, by list all available cultures.

            foreach (var culture in CultureInfo.GetCultures(CultureTypes.AllCultures))
            {
                Console.WriteLine(culture.Name);
            }

Then, the result have lots of differences, not just missing zh-CN or zh-HK.

This file is executed and fetched under Windows 10 1809
Windows.txt

This file is executed and fetched under Linux 4.9.0-8-amd64 dotnet/corefx#1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
Linux.txt

I can use zh-Hans to replace zh-CN, but it would missing some other things, like DateTime format. Also, most npm package are using zh-CN as default Simp. Chinese language code, so it may also missing the localization data for such npm package, like Bootstrap DatetimePicker, if I directly using Culture infomation for js localization.

Is there have any existing solution for that case? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.GlobalizationquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions