Files
TCPlayerbotCore/src/common/Common.cpp
T

60 lines
1.5 KiB
C++
Raw Normal View History

/*
2020-01-02 06:44:10 +01:00
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#include "Common.h"
2009-10-17 15:51:44 -07:00
char const* localeNames[TOTAL_LOCALES] =
2015-04-10 18:10:52 +02:00
{
"enUS",
"koKR",
"frFR",
"deDE",
"zhCN",
"zhTW",
"esES",
"esMX",
"ruRU",
"none",
"ptBR",
"itIT"
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
LocaleConstant GetLocaleByName(std::string_view name)
2008-10-02 16:23:55 -05:00
{
2010-09-28 08:21:51 +03:00
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
2015-04-10 18:10:52 +02:00
if (name == localeNames[i])
2008-10-02 16:23:55 -05:00
return LocaleConstant(i);
2009-10-17 15:51:44 -07:00
return TOTAL_LOCALES;
2008-10-02 16:23:55 -05:00
}
CascLocaleBit WowLocaleToCascLocaleBit[TOTAL_LOCALES] =
{
CascLocaleBit::enUS,
CascLocaleBit::koKR,
CascLocaleBit::frFR,
CascLocaleBit::deDE,
CascLocaleBit::zhCN,
CascLocaleBit::zhTW,
CascLocaleBit::esES,
CascLocaleBit::esMX,
CascLocaleBit::ruRU,
CascLocaleBit::None,
CascLocaleBit::ptBR,
CascLocaleBit::itIT
};