summaryrefslogtreecommitdiff
path: root/src/common/Common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Common.cpp')
-rw-r--r--src/common/Common.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/Common.cpp b/src/common/Common.cpp
index 435d83b396..e25611e068 100644
--- a/src/common/Common.cpp
+++ b/src/common/Common.cpp
@@ -41,6 +41,16 @@ LocaleConstant GetLocaleByName(const std::string& name)
return LOCALE_enUS; // including enGB case
}
+const std::string GetNameByLocaleConstant(LocaleConstant localeConstant)
+{
+ if (localeConstant < TOTAL_LOCALES)
+ {
+ return localeNames[localeConstant];
+ }
+
+ return "enUS"; // Default value for unsupported or invalid LocaleConstant
+}
+
void CleanStringForMysqlQuery(std::string& str)
{
std::string::size_type n = 0;