aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Localization/LocalizationManager.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2025-08-03 17:29:40 -0400
committerGitHub <noreply@github.com>2025-08-03 17:29:40 -0400
commit1262ac31dce4a0d59a427312baeade9a846b5b91 (patch)
treefb3b3c19620a8002c4620cff5964f495fa3e21c3 /Emby.Server.Implementations/Localization/LocalizationManager.cs
parent0f5bb5cf767e8c5a767be32e26016cae17ae341c (diff)
parent2007815fa6b592984a64a6d3d978d41ae8f7347b (diff)
Merge pull request #14410 from dyphire/language
Further refinement of BCP 47 language labeling support
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
-rw-r--r--Emby.Server.Implementations/Localization/LocalizationManager.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs
index 242f2af56..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;