Browse Source
Merge pull request #6751 from Morph1984/languagecode
service: ns: Map ZH_TW and ZH_CN to Traditional/Simplified Chinese
pull/15/merge
Ameer J
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
42 deletions
-
src/core/hle/service/ns/language.cpp
-
src/core/hle/service/ns/ns_language.h
|
|
|
@ -344,8 +344,10 @@ std::optional<ApplicationLanguage> ConvertToApplicationLanguage( |
|
|
|
return ApplicationLanguage::Russian; |
|
|
|
case Set::LanguageCode::KO: |
|
|
|
return ApplicationLanguage::Korean; |
|
|
|
case Set::LanguageCode::ZH_TW: |
|
|
|
case Set::LanguageCode::ZH_HANT: |
|
|
|
return ApplicationLanguage::TraditionalChinese; |
|
|
|
case Set::LanguageCode::ZH_CN: |
|
|
|
case Set::LanguageCode::ZH_HANS: |
|
|
|
return ApplicationLanguage::SimplifiedChinese; |
|
|
|
default: |
|
|
|
|
|
|
|
@ -1,42 +0,0 @@ |
|
|
|
// Copyright 2019 yuzu emulator team |
|
|
|
// Licensed under GPLv2 or any later version |
|
|
|
// Refer to the license.txt file included. |
|
|
|
|
|
|
|
#pragma once |
|
|
|
#include <optional> |
|
|
|
#include <string> |
|
|
|
#include "common/common_types.h" |
|
|
|
#include "core/hle/service/set/set.h" |
|
|
|
|
|
|
|
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, |
|
|
|
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( |
|
|
|
Service::Set::LanguageCode language_code); |
|
|
|
std::optional<Service::Set::LanguageCode> ConvertToLanguageCode(ApplicationLanguage lang); |
|
|
|
} // namespace Service::NS |