diff options
author | lolbot-iichan | 2018-08-27 01:07:21 +0300 |
---|---|---|
committer | Filippos Karapetis | 2020-01-11 18:05:39 +0200 |
commit | 197a9542646ba30b33901b135ee14892a801694b (patch) | |
tree | 115cf547733f7c031ff8a94c992dcccbf184372f /engines/wintermute/base | |
parent | 364c9eda55a4168db32e746e8ce6962069f6cff8 (diff) | |
download | scummvm-rg350-197a9542646ba30b33901b135ee14892a801694b.tar.gz scummvm-rg350-197a9542646ba30b33901b135ee14892a801694b.tar.bz2 scummvm-rg350-197a9542646ba30b33901b135ee14892a801694b.zip |
WINTERMUTE: Add FoxTail language property
FoxTail gets a Steam API language code on 1st start from Game.SystemLanguage property
FoxTail currently uses 5 languages: English, German, Polish, Russian, Ukrainian
Even more languages are promised on release, so let's support all possible languages here
There are 22 languages listed both in common/language.h and Steam API, supported them all
See https://partner.steamgames.com/doc/store/localization for current API language codes
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_game.cpp | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index a06511f3ea..2d30eb9bb5 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -2329,6 +2329,84 @@ ScValue *BaseGame::scGetProperty(const Common::String &name) { return _scValue; } +#ifdef ENABLE_FOXTAIL + ////////////////////////////////////////////////////////////////////////// + // [FoxTail] SystemLanguage (RO) + // Returns Steam API language name string + ////////////////////////////////////////////////////////////////////////// + else if (name == "SystemLanguage") { + switch (Common::parseLanguage(ConfMan.get("language"))) { + case Common::CZ_CZE: + _scValue->setString("czech"); + break; + case Common::DA_DAN: + _scValue->setString("danish"); + break; + case Common::DE_DEU: + _scValue->setString("german"); + break; + case Common::ES_ESP: + _scValue->setString("spanish"); + break; + case Common::FI_FIN: + _scValue->setString("finnish"); + break; + case Common::FR_FRA: + _scValue->setString("french"); + break; + case Common::GR_GRE: + _scValue->setString("greek"); + break; + case Common::HU_HUN: + _scValue->setString("hungarian"); + break; + case Common::IT_ITA: + _scValue->setString("italian"); + break; + case Common::JA_JPN: + _scValue->setString("japanese"); + break; + case Common::KO_KOR: + _scValue->setString("koreana"); + break; + case Common::NB_NOR: + _scValue->setString("norwegian"); + break; + case Common::NL_NLD: + _scValue->setString("dutch"); + break; + case Common::PT_BRA: + _scValue->setString("brazilian"); + break; + case Common::PT_POR: + _scValue->setString("portuguese"); + break; + case Common::PL_POL: + _scValue->setString("polish"); + break; + case Common::RU_RUS: + _scValue->setString("russian"); + break; + case Common::SE_SWE: + _scValue->setString("swedish"); + break; + case Common::UA_UKR: + _scValue->setString("ukrainian"); + break; + case Common::ZH_CNA: + _scValue->setString("schinese"); + break; + case Common::ZH_TWN: + _scValue->setString("tchinese"); + break; + default: + _scValue->setString("english"); + break; + } + return _scValue; + } +#endif + ////////////////////////////////////////////////////////////////////////// // Platform (RO) ////////////////////////////////////////////////////////////////////////// |