2019-05-23 08:28:27 +00:00
|
|
|
// Copyright 2019 yuzu emulator team
|
2019-05-23 07:55:56 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2019-05-23 08:28:27 +00:00
|
|
|
#include "core/hle/service/ns/language.h"
|
|
|
|
#include "core/hle/service/set/set.h"
|
2019-05-23 07:55:56 +00:00
|
|
|
|
|
|
|
namespace Service::NS {
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_american_english = {{
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_british_english = {{
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_japanese = {{
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_french = {{
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_german = {{
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_latin_american_spanish = {{
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_spanish = {{
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_italian = {{
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_dutch = {{
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_canadian_french = {{
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_portuguese = {{
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_russian = {{
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_korean = {{
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_traditional_chinese = {{
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
|
|
|
constexpr ApplicationLanguagePriorityList priority_list_simplified_chinese = {{
|
|
|
|
ApplicationLanguage::SimplifiedChinese,
|
|
|
|
ApplicationLanguage::TraditionalChinese,
|
|
|
|
ApplicationLanguage::AmericanEnglish,
|
|
|
|
ApplicationLanguage::BritishEnglish,
|
|
|
|
ApplicationLanguage::Japanese,
|
|
|
|
ApplicationLanguage::LatinAmericanSpanish,
|
|
|
|
ApplicationLanguage::CanadianFrench,
|
|
|
|
ApplicationLanguage::French,
|
|
|
|
ApplicationLanguage::German,
|
|
|
|
ApplicationLanguage::Spanish,
|
|
|
|
ApplicationLanguage::Italian,
|
|
|
|
ApplicationLanguage::Dutch,
|
|
|
|
ApplicationLanguage::Portuguese,
|
|
|
|
ApplicationLanguage::Russian,
|
|
|
|
ApplicationLanguage::Korean,
|
|
|
|
}};
|
|
|
|
|
2019-05-23 08:14:11 +00:00
|
|
|
const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(
|
2019-05-23 08:28:27 +00:00
|
|
|
const ApplicationLanguage lang) {
|
2019-05-23 07:55:56 +00:00
|
|
|
switch (lang) {
|
|
|
|
case ApplicationLanguage::AmericanEnglish:
|
|
|
|
return &priority_list_american_english;
|
|
|
|
case ApplicationLanguage::BritishEnglish:
|
|
|
|
return &priority_list_british_english;
|
|
|
|
case ApplicationLanguage::Japanese:
|
|
|
|
return &priority_list_japanese;
|
|
|
|
case ApplicationLanguage::French:
|
|
|
|
return &priority_list_french;
|
|
|
|
case ApplicationLanguage::German:
|
|
|
|
return &priority_list_german;
|
|
|
|
case ApplicationLanguage::LatinAmericanSpanish:
|
|
|
|
return &priority_list_latin_american_spanish;
|
|
|
|
case ApplicationLanguage::Spanish:
|
|
|
|
return &priority_list_spanish;
|
|
|
|
case ApplicationLanguage::Italian:
|
|
|
|
return &priority_list_italian;
|
|
|
|
case ApplicationLanguage::Dutch:
|
|
|
|
return &priority_list_dutch;
|
|
|
|
case ApplicationLanguage::CanadianFrench:
|
|
|
|
return &priority_list_canadian_french;
|
|
|
|
case ApplicationLanguage::Portuguese:
|
|
|
|
return &priority_list_portuguese;
|
|
|
|
case ApplicationLanguage::Russian:
|
|
|
|
return &priority_list_russian;
|
|
|
|
case ApplicationLanguage::Korean:
|
|
|
|
return &priority_list_korean;
|
|
|
|
case ApplicationLanguage::TraditionalChinese:
|
|
|
|
return &priority_list_traditional_chinese;
|
|
|
|
case ApplicationLanguage::SimplifiedChinese:
|
|
|
|
return &priority_list_simplified_chinese;
|
|
|
|
default:
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<ApplicationLanguage> ConvertToApplicationLanguage(
|
2019-05-23 08:28:27 +00:00
|
|
|
const Set::LanguageCode language_code) {
|
2019-05-23 07:55:56 +00:00
|
|
|
switch (language_code) {
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::EN_US:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::AmericanEnglish;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::EN_GB:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::BritishEnglish;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::JA:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Japanese;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::FR:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::French;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::DE:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::German;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::ES_419:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::LatinAmericanSpanish;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::ES:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Spanish;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::IT:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Italian;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::NL:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Dutch;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::FR_CA:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::CanadianFrench;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::PT:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Portuguese;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::RU:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Russian;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::KO:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::Korean;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::ZH_HANT:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::TraditionalChinese;
|
2019-05-23 08:28:27 +00:00
|
|
|
case Set::LanguageCode::ZH_HANS:
|
2019-05-23 07:55:56 +00:00
|
|
|
return ApplicationLanguage::SimplifiedChinese;
|
|
|
|
default:
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-23 08:28:27 +00:00
|
|
|
std::optional<Set::LanguageCode> ConvertToLanguageCode(const ApplicationLanguage lang) {
|
2019-05-23 07:55:56 +00:00
|
|
|
switch (lang) {
|
|
|
|
case ApplicationLanguage::AmericanEnglish:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::EN_US;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::BritishEnglish:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::EN_GB;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Japanese:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::JA;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::French:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::FR;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::German:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::DE;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::LatinAmericanSpanish:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::ES_419;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Spanish:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::ES;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Italian:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::IT;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Dutch:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::NL;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::CanadianFrench:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::FR_CA;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Portuguese:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::PT;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Russian:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::RU;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::Korean:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::KO;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::TraditionalChinese:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::ZH_HANT;
|
2019-05-23 07:55:56 +00:00
|
|
|
case ApplicationLanguage::SimplifiedChinese:
|
2019-05-23 08:28:27 +00:00
|
|
|
return Set::LanguageCode::ZH_HANS;
|
2019-05-23 07:55:56 +00:00
|
|
|
default:
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace Service::NS
|