How to update the Windows Language Code Identifier in Windows Server?

152 Views Asked by At

I recently started having a problem with CultureInfo in my web application.

The code in question:

    public static CultureInfo ConvertToCultureInfo(this string input)
    {
        try
        {
            return new CultureInfo(input);
        }
        catch (Exception)
        {

            return new CultureInfo("en-US");
        }
    }

When a user whose locale is 'en-AT' is accessing my website the request for this cultureinfo works on my local but is failing on my Windows Server 2012 box (and falling back to en-US, which is incorrect).

We tracked it down to an issue with the MS-LCID version 10.1 but this is allegedly only available for Windows Server 2016.

However, this occurs to me as kind of silly - why can't we just download a package that updates the existing LCID to support the newer locales? It's still the same list of dateformats and Windows Server 2012 is still supported. I can't find any resources on updating this and was hoping someone here knew a bit about this and could point me in the right direction.

Right now my best lead is to additionally test for custom CultureInfos and supply my own formats, but this seems like overkill when there exists the LCID, it's just somewhat out of date.

0

There are 0 best solutions below