|
@@ -18,10 +18,16 @@ enum class ELanguages
|
|
|
ENGLISH,
|
|
|
FRENCH,
|
|
|
GERMAN,
|
|
|
+ KOREAN,
|
|
|
POLISH,
|
|
|
RUSSIAN,
|
|
|
UKRAINIAN,
|
|
|
|
|
|
+ // Pseudo-languages, that have no translations but can define H3 encoding to use
|
|
|
+ OTHER_CP1250,
|
|
|
+ OTHER_CP1251,
|
|
|
+ OTHER_CP1252,
|
|
|
+
|
|
|
COUNT
|
|
|
};
|
|
|
|
|
@@ -46,34 +52,38 @@ struct Options
|
|
|
bool hasTranslation = false;
|
|
|
};
|
|
|
|
|
|
-inline auto const & getLanguageList( )
|
|
|
+inline const auto & getLanguageList()
|
|
|
{
|
|
|
- static const std::array<Options, 7> languages
|
|
|
+ static const std::array<Options, 11> languages
|
|
|
{ {
|
|
|
- { "chinese", "Chinese", "简体中文", "GBK", true, true },
|
|
|
+ { "chinese", "Chinese", "简体中文", "GBK", true, true },
|
|
|
{ "english", "English", "English", "CP1252", true, true },
|
|
|
{ "french", "French", "Français", "CP1252", true, true },
|
|
|
{ "german", "German", "Deutsch", "CP1252", true, true },
|
|
|
- //TODO: korean - CP949 encoding
|
|
|
+ { "korean", "Korean", "한국어", "CP949", false, true },
|
|
|
{ "polish", "Polish", "Polski", "CP1250", true, true },
|
|
|
{ "russian", "Russian", "Русский", "CP1251", true, true },
|
|
|
- { "ukrainian", "Ukrainian", "Українська", "CP1251", true, true }
|
|
|
+ { "ukrainian", "Ukrainian", "Українська", "CP1251", true, true },
|
|
|
+
|
|
|
+ { "other_cp1250", "Other (East European)", "", "CP1251", false, false },
|
|
|
+ { "other_cp1251", "Other (Cyrillic Script)", "", "CP1250", false, false },
|
|
|
+ { "other_cp1250", "Other (West European)", "", "CP1252", false, false }
|
|
|
} };
|
|
|
- static_assert (languages.size() == static_cast<size_t>(ELanguages::COUNT), "Languages array is missing a value!" );
|
|
|
+ static_assert(languages.size() == static_cast<size_t>(ELanguages::COUNT), "Languages array is missing a value!");
|
|
|
|
|
|
return languages;
|
|
|
}
|
|
|
|
|
|
-inline const Options & getLanguageOptions( ELanguages language )
|
|
|
+inline const Options & getLanguageOptions(ELanguages language)
|
|
|
{
|
|
|
assert(language < ELanguages::COUNT);
|
|
|
return getLanguageList()[static_cast<size_t>(language)];
|
|
|
}
|
|
|
|
|
|
-inline const Options & getLanguageOptions( std::string language )
|
|
|
+inline const Options & getLanguageOptions(const std::string & language)
|
|
|
{
|
|
|
- for (auto const & entry : getLanguageList())
|
|
|
- if (entry.identifier == language)
|
|
|
+ for(const auto & entry : getLanguageList())
|
|
|
+ if(entry.identifier == language)
|
|
|
return entry;
|
|
|
|
|
|
static const Options emptyValue;
|