2019-05-23 08:28:27 +00:00
|
|
|
// Copyright 2019 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Service::Set {
|
|
|
|
enum class LanguageCode : u64;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Service::NS {
|
|
|
|
/// This is nn::ns::detail::ApplicationLanguage
|
|
|
|
enum class ApplicationLanguage : u8 {
|
|
|
|
AmericanEnglish = 0,
|
|
|
|
BritishEnglish,
|
|
|
|
Japanese,
|
|
|
|
French,
|
|
|
|
German,
|
|
|
|
LatinAmericanSpanish,
|
|
|
|
Spanish,
|
|
|
|
Italian,
|
|
|
|
Dutch,
|
|
|
|
CanadianFrench,
|
|
|
|
Portuguese,
|
|
|
|
Russian,
|
|
|
|
Korean,
|
|
|
|
TraditionalChinese,
|
|
|
|
SimplifiedChinese,
|
2021-10-29 00:03:23 +00:00
|
|
|
BrazilianPortuguese,
|
2019-05-23 08:28:27 +00:00
|
|
|
Count
|
|
|
|
};
|
|
|
|
using ApplicationLanguagePriorityList =
|
|
|
|
const std::array<ApplicationLanguage, static_cast<std::size_t>(ApplicationLanguage::Count)>;
|
|
|
|
|
|
|
|
constexpr u32 GetSupportedLanguageFlag(const ApplicationLanguage lang) {
|
|
|
|
return 1U << static_cast<u32>(lang);
|
|
|
|
}
|
|
|
|
|
|
|
|
const ApplicationLanguagePriorityList* GetApplicationLanguagePriorityList(ApplicationLanguage lang);
|
|
|
|
std::optional<ApplicationLanguage> ConvertToApplicationLanguage(Set::LanguageCode language_code);
|
|
|
|
std::optional<Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang);
|
2021-11-04 01:21:01 +00:00
|
|
|
} // namespace Service::NS
|