From 54ade83fd6f939fd2b6786d9ff9b190b2597f38e Mon Sep 17 00:00:00 2001 From: trembyle Date: Sat, 14 Aug 2021 16:50:57 -0400 Subject: [PATCH] COMMON: Add constants for new Director game languages Catalan and Flemish use existing ISO/locale codes Arabic uses generic ARB for country code. There is no clear country code to apply here. We can take ARB to mean Arab League or Modern Standard Arabic. TODO: Consult Arabic speakers on country-level dialects --- common/language.cpp | 5 ++++- common/language.h | 23 +++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/common/language.cpp b/common/language.cpp index a5fd39760d8..67b27495da5 100644 --- a/common/language.cpp +++ b/common/language.cpp @@ -27,6 +27,8 @@ namespace Common { const LanguageDescription g_languages[] = { + { "ar", "ar", "Arabic", AR_ARB }, // Modern Standard Arabic + { "ca", "ca_ES", "Catalan", CA_ESP }, { "nz", "nz", "Chinese", ZH_ANY }, // Generic Chinese (when only one game version exist) { "zh-cn", "zh_CN", "Chinese (China)", ZH_CNA }, { "zh", "zh_TW", "Chinese (Taiwan)", ZH_TWN }, @@ -39,6 +41,7 @@ const LanguageDescription g_languages[] = { { "us", "en_US", "English (US)", EN_USA }, { "et", "et_EE", "Estonian", ET_EST }, { "fi", "fi_FI", "Finnish", FI_FIN }, + { "vl", "nl_BE", "Flemish", NL_BEL }, { "fr", "fr_FR", "French", FR_FRA }, { "de", "de_DE", "German", DE_DEU }, { "gr", "el_GR", "Greek", GR_GRE }, @@ -55,12 +58,12 @@ const LanguageDescription g_languages[] = { { "br", "pt_BR", "Portuguese (Brazil)", PT_BRA }, { "pt", "pt_PT", "Portuguese (Portugal)", PT_POR }, { "ru", "ru_RU", "Russian", RU_RUS }, + { "sr", "sr_SP", "Serbian", SR_SER }, { "sk", "sk_SK", "Slovak", SK_SVK }, { "es", "es_ES", "Spanish", ES_ESP }, { "se", "sv_SE", "Swedish", SE_SWE }, { "tr", "tr_TR", "Turkish", TR_TUR }, { "uk", "uk_UA", "Ukrainian", UA_UKR }, - { "sr", "sr_SP", "Serbian", SR_SER }, { nullptr, nullptr, nullptr, UNK_LANG } }; diff --git a/common/language.h b/common/language.h index 75349a64833..fdc6493d5ce 100644 --- a/common/language.h +++ b/common/language.h @@ -43,39 +43,42 @@ class String; * List of game language. */ enum Language { - ZH_ANY, // Generic Chinese (when only one game version exist) - ZH_CNA, - ZH_TWN, - HR_HRV, + AR_ARB, + CA_ESP, CZ_CZE, DA_DAN, - NL_NLD, + DE_DEU, EN_ANY, // Generic English (when only one game version exist) EN_GRB, EN_USA, + ES_ESP, ET_EST, FI_FIN, + FA_IRN, FR_FRA, - DE_DEU, GR_GRE, HE_ISR, + HR_HRV, HU_HUN, IT_ITA, JA_JPN, KO_KOR, LV_LAT, + NL_BEL, + NL_NLD, NB_NOR, - FA_IRN, PL_POL, PT_BRA, PT_POR, RU_RUS, - SK_SVK, - ES_ESP, SE_SWE, + SK_SVK, + SR_SER, TR_TUR, UA_UKR, - SR_SER, + ZH_ANY, // Generic Chinese (when only one game version exist) + ZH_CNA, + ZH_TWN, UNK_LANG = -1 // Use default language (i.e. none specified) };