Fix couple of bugs in i18n when source string contains non-ASCII characters.

This commit is contained in:
Alexey Sokolov
2016-02-04 21:21:37 +00:00
parent 5b624a7a99
commit f01076cc6e
2 changed files with 20 additions and 14 deletions

View File

@@ -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();
if (sLanguage.empty()) sLanguage = "C";
#ifdef HAVE_I18N
// Not using built-in support for multiple domains in single std::locale
// via overloaded call to .str() because we need to be able to reload