Change Chinese Language Localization Names (#1749)

* locale name standardize

* change ko back to English

* cn -> zh

* Change Chinese localization mapping

- Maps tw to zh-hant, and zh to zh-hans
- Removes explicit override for tw langcode in UI
- Makes all languages use Windows-provided name and capitalization
- Add note to ko to prevent accidental helpful PRs

---------

Co-authored-by: wozaiha <wozaiha@gmail.com>
This commit is contained in:
KazWolfe 2024-03-25 04:04:49 -07:00 committed by GitHub
parent 3c471575af
commit 9bd80ee39f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -70,14 +70,15 @@ public class Localization : IServiceType
public CultureInfo DalamudLanguageCultureInfo { get; private set; }
/// <summary>
/// Gets an instance of <see cref="CultureInfo"/> that corresponds to <paramref name="langCode"/>.
/// Gets an instance of <see cref="CultureInfo"/> that corresponds to a Dalamud <paramref name="langCode"/>.
/// </summary>
/// <param name="langCode">The language code which should be in <see cref="ApplicableLangCodes"/>.</param>
/// <returns>The corresponding instance of <see cref="CultureInfo"/>.</returns>
public static CultureInfo GetCultureInfoFromLangCode(string langCode) =>
CultureInfo.GetCultureInfo(langCode switch
{
"tw" => "zh-tw",
"tw" => "zh-hant",
"zh" => "zh-hans",
_ => langCode,
});