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  LT_LTU,
69  LV_LVA,
70  NL_BEL,
71  NL_NLD,
72  NB_NOR,
73  PL_POL,
74  PT_BRA,
75  PT_PRT,
76  RU_RUS,
77  SE_SWE,
78  SK_SVK,
79  SR_SRB,
80  TR_TUR,
81  UA_UKR,
82  ZH_ANY, // Generic Chinese (when only one game version exist)
83  ZH_CHN,
84  ZH_TWN,
85 
86  UNK_LANG = -1 // Use default language (i.e. none specified)
87 };
88 
90  const char *code;
91  const char *unixLocale;
92  const char *description;
93  Language id;
94 };
95 
96 extern const LanguageDescription g_languages[];
97 extern const LanguageDescription g_obsoleteLanguages[];
98 
100 extern Language parseLanguage(const String &str);
101 extern Language parseLanguageFromLocale(const char *locale);
102 extern const char *getLanguageCode(Language id);
103 extern const char *getLanguageLocale(Language id);
104 extern const char *getLanguageDescription(Language id);
105 
106 // TODO: Document this GUIO related function
107 const String getGameGUIOptionsDescriptionLanguage(Common::Language lang);
108 
109 // TODO: Document this GUIO related function
110 bool checkGameGUIOptionLanguage(Common::Language lang, const String &str);
111 
112 List<String> getLanguageList();
113 
116 } // End of namespace Common
117 
118 #endif
Definition: str.h:59
Language parseLanguage(const String &str)
Definition: language.h:89
Definition: list.h:44
Definition: algorithm.h:29
Language
Definition: language.h:45