Project SkyFire Core
SkyFire 5.4.8 server core API documentation
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
8char 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
23LocaleConstant 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
char const * localeNames[TOTAL_LOCALES]
Definition Common.cpp:8
LocaleConstant GetLocaleByName(const std::string &name)
Definition Common.cpp:23
const uint8 TOTAL_LOCALES
Definition Common.h:153
LocaleConstant
Definition Common.h:138
@ LOCALE_enUS
Definition Common.h:139
std::uint32_t uint32
Definition Define.h:77