ScummVM API documentation
language.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef COMMON_LANGUAGE_H
23 #define COMMON_LANGUAGE_H
24 
25 #include "common/scummsys.h"
26 #include "common/list.h"
27 
28 namespace Common {
29 
40 class String;
41 
45 enum Language : int8 {
46  AR_ARB,
47  BG_BUL,
48  CA_ESP,
49  CS_CZE,
50  DA_DNK,
51  DE_DEU,
52  EL_GRC,
53  EN_ANY, // Generic English (when only one game version exist)
54  EN_GRB,
55  EN_USA,
56  ES_ESP,
57  EU_ESP,
58  ET_EST,
59  FA_IRN,
60  FI_FIN,
61  FR_FRA,
62  HE_ISR,
63  HR_HRV,
64  HU_HUN,
65  IT_ITA,
66  JA_JPN,
67  KO_KOR,
68  LV_LVA,
69  NL_BEL,
70  NL_NLD,
71  NB_NOR,
72  PL_POL,
73  PT_BRA,
74  PT_PRT,
75  RU_RUS,
76  SE_SWE,
77  SK_SVK,
78  SR_SRB,
79  TR_TUR,
80  UA_UKR,
81  ZH_ANY, // Generic Chinese (when only one game version exist)
82  ZH_CHN,
83  ZH_TWN,
84 
85  UNK_LANG = -1 // Use default language (i.e. none specified)
86 };
87 
89  const char *code;
90  const char *unixLocale;
91  const char *description;
92  Language id;
93 };
94 
95 extern const LanguageDescription g_languages[];
96 extern const LanguageDescription g_obsoleteLanguages[];
97 
99 extern Language parseLanguage(const String &str);
100 extern Language parseLanguageFromLocale(const char *locale);
101 extern const char *getLanguageCode(Language id);
102 extern const char *getLanguageLocale(Language id);
103 extern const char *getLanguageDescription(Language id);
104 
105 // TODO: Document this GUIO related function
106 const String getGameGUIOptionsDescriptionLanguage(Common::Language lang);
107 
108 // TODO: Document this GUIO related function
109 bool checkGameGUIOptionLanguage(Common::Language lang, const String &str);
110 
111 List<String> getLanguageList();
112 
115 } // End of namespace Common
116 
117 #endif
Definition: str.h:59
Language parseLanguage(const String &str)
Definition: language.h:88
Definition: list.h:44
Definition: algorithm.h:29
Language
Definition: language.h:45