[LangInfo] Use gui's language for dvd/bluray menus.
authorace20022 <ace20022@ymail.com>
Mon, 30 Sep 2013 22:24:52 +0000 (00:24 +0200)
committerace20022 <ace20022@ymail.com>
Sat, 5 Oct 2013 09:24:47 +0000 (11:24 +0200)
xbmc/LangInfo.cpp
xbmc/LangInfo.h

index f926c39..f9529ec 100644 (file)
@@ -483,9 +483,13 @@ void CLangInfo::SetSubtitleLanguage(const CStdString &language)
 }
 
 // two character codes as defined in ISO639
-const CStdString& CLangInfo::GetDVDMenuLanguage() const
+const std::string CLangInfo::GetDVDMenuLanguage() const
 {
-  return m_currentRegion->m_strDVDMenuLanguage;
+  CStdString code;
+  if (!g_LangCodeExpander.ConvertToTwoCharCode(code, m_currentRegion->m_strLangLocaleName))
+    code = m_currentRegion->m_strDVDMenuLanguage;
+  
+  return code;
 }
 
 // two character codes as defined in ISO639
index 80c7118..b13bd44 100644 (file)
@@ -57,7 +57,7 @@ public:
   // or a language name in english (as used by XBMC)
   void SetSubtitleLanguage(const CStdString &language);
 
-  const CStdString& GetDVDMenuLanguage() const;
+  const std::string GetDVDMenuLanguage() const;
   const std::string GetDVDAudioLanguage() const;
   const std::string GetDVDSubtitleLanguage() const;
   const CStdString& GetTimeZone() const;