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