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
28namespace Common {
29
40class String;
41
45enum 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 TH_THA,
82 TR_TUR,
83 UA_UKR,
84 ZH_ANY, // Generic Chinese (when only one game version exist)
85 ZH_CHN,
86 ZH_TWN,
87
88 UNK_LANG = -1 // Use default language (i.e. none specified)
89};
90
92 const char *code;
93 const char *unixLocale;
94 const char *description;
95 Language id;
96};
97
98extern const LanguageDescription g_languages[];
99extern const LanguageDescription g_obsoleteLanguages[];
100
102extern Language parseLanguage(const String &str);
103extern Language parseLanguageFromLocale(const char *locale);
104extern const char *getLanguageCode(Language id);
105extern const char *getLanguageLocale(Language id);
106extern const char *getLanguageDescription(Language id);
107
108// TODO: Document this GUIO related function
109const String getGameGUIOptionsDescriptionLanguage(Language lang);
110const String getGameGUIOptionsDescriptionLanguages(const List<Language> &languages);
111List<Language> parseLanguagesFromGameGUIOptionsString(const String &optionsString);
112
113// TODO: Document this GUIO related function
114bool checkGameGUIOptionLanguage(Language lang, const String &str);
115
116List<String> getLanguageList();
117
120} // End of namespace Common
121
122#endif
Definition: list.h:44
Definition: str.h:59
Language parseLanguage(const String &str)
Language
Definition: language.h:45
Definition: algorithm.h:29
Definition: language.h:91