diff options
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Localization/LocalizationManager.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 17db7ad4c..b4c65ad85 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -128,7 +128,8 @@ namespace Emby.Server.Implementations.Localization } string name = parts[3]; - if (string.IsNullOrWhiteSpace(name)) + string displayname = parts[3]; + if (string.IsNullOrWhiteSpace(displayname)) { continue; } @@ -138,6 +139,10 @@ namespace Emby.Server.Implementations.Localization { continue; } + else if (twoCharName.Contains('-', StringComparison.OrdinalIgnoreCase)) + { + name = twoCharName; + } string[] threeLetterNames; if (string.IsNullOrWhiteSpace(parts[1])) @@ -153,7 +158,7 @@ namespace Emby.Server.Implementations.Localization iso6392BtoTdict.TryAdd(parts[1], parts[0]); } - list.Add(new CultureDto(name, name, twoCharName, threeLetterNames)); + list.Add(new CultureDto(name, displayname, twoCharName, threeLetterNames)); } _cultures = list; @@ -520,7 +525,7 @@ namespace Emby.Server.Implementations.Localization public bool TryGetISO6392TFromB(string isoB, [NotNullWhen(true)] out string? isoT) { // Unlikely case the dictionary is not (yet) initialized properly - if (_iso6392BtoT == null) + if (_iso6392BtoT is null) { isoT = null; return false; |
