mirror of
https://github.com/znc/znc.git
synced 2026-07-30 13:33:42 +02:00
Use IETF language tags for configuring language
This commit is contained in:
@@ -1381,7 +1381,7 @@ class CWebAdminMod : public CModule {
|
||||
l_en["Code"] = "";
|
||||
l_en["Name"] = "English";
|
||||
CTemplate& l_ru = Tmpl.AddRow("LanguageLoop");
|
||||
l_ru["Code"] = "ru_RU";
|
||||
l_ru["Code"] = "ru-RU";
|
||||
l_ru["Name"] = "Russian";
|
||||
#else
|
||||
Tmpl["HaveI18N"] = "false";
|
||||
|
||||
@@ -52,6 +52,7 @@ CString CTranslation::Plural(const CString& sDomain, const CString& sContext,
|
||||
|
||||
const std::locale& CTranslation::LoadTranslation(const CString& sDomain) {
|
||||
CString sLanguage = m_sLanguageStack.empty() ? "" : m_sLanguageStack.back();
|
||||
sLanguage.Replace("-", "_");
|
||||
if (sLanguage.empty()) sLanguage = "C";
|
||||
#ifdef HAVE_I18N
|
||||
// Not using built-in support for multiple domains in single std::locale
|
||||
|
||||
Reference in New Issue
Block a user