U4-8493 - Bug: Changing Language Culture Name does not update database properly

Created by Robert Foster 22 May 2016, 17:26:07 Updated by Gareth Wright 21 Jun 2018, 12:43:50

I have a list of 5 languages, and wanted to change the order in which they appear (for Vorto). So I swapped the culture on two - English US and English New Zealand.

I also changed Catalan (French) to French (Canada) as it was wrong. The umbracoLanguage database table now looks like this:

||id||languageISOCode||languageCultureName|| |1|en-NZ|en-US| |2|en-CA|English (Canada)| |3|en-AU|English (Australia)| |4|en-US|English (New Zealand)| |5|fr-CA|Catalan (French)|

What I expect to see after performing the updates should be as follows:

||id||languageISOCode||languageCultureName|| |1|en-NZ|English (New Zealand)| |2|en-CA|English (Canada)| |3|en-AU|English (Australia)| |4|en-US|English (United States)| |5|fr-CA|French (Canada)|

I discovered this when I was trying to determine the list of Region Names for a region picker. The following code ApplicationContext.Current.Services.LocalizationService.GetLanguageByIsoCode("fr-CA")?.CultureInfo

was returning Catalan (France)

Comments

Ronald Barendse 11 Dec 2017, 16:30:31

The LanguageRepository is cached, so you're probably just seeing the outdated data. The cache isn't invalidated if you changed this in the database, so you'd have to recycle/restart the website to see the updated value.


Gareth Wright 21 Jun 2018, 12:40:29

We're seeing this issue as well.

If you change the default language from English (United States) to English (United Kingdom)... it doesn't update the language culture name properly in the database.

You end up with:

languageISOCode: en-GB languageCultureName: en-US

This should be:

languageISOCode: en-GB languageCultureName: English (United Kingdom)

I think this applies to any time you change a set language though the languages section.


Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category: Localization

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.3, 7.7.13

Due in version:

Sprint:

Story Points:

Cycle: