2010-10-07 15:35:36 +02:00
|
|
|
/*
|
2015-01-01 00:27:46 +01:00
|
|
|
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
2010-10-07 15:35:36 +02:00
|
|
|
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
2015-04-10 18:10:52 +02:00
|
|
|
char const* localeNames[TOTAL_LOCALES] =
|
|
|
|
|
{
|
2008-10-02 16:23:55 -05:00
|
|
|
"enUS",
|
|
|
|
|
"koKR",
|
|
|
|
|
"frFR",
|
|
|
|
|
"deDE",
|
|
|
|
|
"zhCN",
|
|
|
|
|
"zhTW",
|
|
|
|
|
"esES",
|
|
|
|
|
"esMX",
|
2015-04-10 18:10:52 +02:00
|
|
|
"ruRU",
|
|
|
|
|
"none",
|
|
|
|
|
"ptBR",
|
|
|
|
|
"itIT"
|
2008-10-02 16:23:55 -05:00
|
|
|
};
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-12-12 11:21:28 -06:00
|
|
|
LocaleConstant GetLocaleByName(const std::string& 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
|
|
|
|
2008-10-02 16:23:55 -05:00
|
|
|
return LOCALE_enUS; // including enGB case
|
|
|
|
|
}
|
2009-02-17 20:07:49 -06:00
|
|
|
|