aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/Application.cpp2
-rw-r--r--xbmc/utils/LangCodeExpander.cpp9
2 files changed, 11 insertions, 0 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 266b9d8488..94e5e9e74b 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -763,6 +763,8 @@ bool CApplication::Create()
CLog::Log(LOGINFO, "load language info file: %s", strLangInfoPath.c_str());
g_langInfo.Load(strLangInfoPath);
+ g_langInfo.SetAudioLanguage(CSettings::Get().GetString("locale.audiolanguage"));
+ g_langInfo.SetSubtitleLanguage(CSettings::Get().GetString("locale.subtitlelanguage"));
CStdString strLanguagePath = "special://xbmc/language/";
diff --git a/xbmc/utils/LangCodeExpander.cpp b/xbmc/utils/LangCodeExpander.cpp
index 3923318658..5ca700e059 100644
--- a/xbmc/utils/LangCodeExpander.cpp
+++ b/xbmc/utils/LangCodeExpander.cpp
@@ -213,6 +213,15 @@ bool CLangCodeExpander::ConvertToThreeCharCode(CStdString& strThreeCharCode, con
}
else if (strCharCode.size() > 3)
{
+ for(unsigned int i = 0; i < sizeof(g_iso639_2) / sizeof(LCENTRY); i++)
+ {
+ if (strCharCode.Equals(g_iso639_2[i].name))
+ {
+ CodeToString(g_iso639_2[i].code, strThreeCharCode);
+ return true;
+ }
+ }
+
CStdString strLangInfoPath;
strLangInfoPath.Format("special://xbmc/language/%s/langinfo.xml", strCharCode.c_str());
CLangInfo langInfo;