Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
Common.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#include "
Common.h
"
7
8
char
const
*
localeNames
[
TOTAL_LOCALES
] = {
9
"enUS"
,
10
"koKR"
,
11
"frFR"
,
12
"deDE"
,
13
"zhCN"
,
14
"zhTW"
,
15
"esES"
,
16
"esMX"
,
17
"ruRU"
,
18
"itIT"
,
19
"ptBR"
,
20
"ptPT"
,
21
};
22
23
LocaleConstant
GetLocaleByName
(
const
std::string& name)
24
{
25
for
(
uint32
i = 0; i <
TOTAL_LOCALES
; ++i)
26
if
(name ==
localeNames
[i])
27
return
LocaleConstant
(i);
28
29
return
LOCALE_enUS
;
// including enGB case
30
}
31
localeNames
char const * localeNames[TOTAL_LOCALES]
Definition
Common.cpp:8
GetLocaleByName
LocaleConstant GetLocaleByName(const std::string &name)
Definition
Common.cpp:23
Common.h
TOTAL_LOCALES
const uint8 TOTAL_LOCALES
Definition
Common.h:153
LocaleConstant
LocaleConstant
Definition
Common.h:138
LOCALE_enUS
@ LOCALE_enUS
Definition
Common.h:139
uint32
std::uint32_t uint32
Definition
Define.h:77
src
server
shared
Common.cpp
Generated on
for Project SkyFire Core by
1.17.0