#include "LangInfo.h"
#include "Application.h"
+#include "ApplicationMessenger.h"
#include "FileItem.h"
#include "Util.h"
#include "filesystem/Directory.h"
#include "guilib/LocalizeStrings.h"
#include "pvr/PVRManager.h"
#include "settings/AdvancedSettings.h"
-#include "settings/Setting.h"
+#include "settings/lib/Setting.h"
#include "settings/Settings.h"
#include "utils/CharsetConverter.h"
#include "utils/log.h"
}
TiXmlElement* pRootElement = xmlDoc.RootElement();
- if (pRootElement->ValueStr() == "language")
+ if (pRootElement->ValueStr() != "language")
{
CLog::Log(onlyCheckLanguage ? LOGDEBUG : LOGERROR, "%s Doesn't contain <language>", strFileName.c_str());
return false;
{
CRegion region(m_defaultRegion);
region.m_strName=pRegion->Attribute("name");
- if (region.m_strName.IsEmpty())
+ if (region.m_strName.empty())
region.m_strName="N/A";
if (pRegion->Attribute("locale"))
strSep = pToken->Attribute("separators");
if (pToken->FirstChild() && pToken->FirstChild()->Value())
{
- if (strSep.IsEmpty())
+ if (strSep.empty())
vecTokens.push_back(pToken->FirstChild()->Value());
else
for (unsigned int i=0;i<strSep.size();++i)
// also tell our weather and skin to reload as these are localized
g_weatherManager.Refresh();
g_PVRManager.LocalizationChanged();
- g_application.ReloadSkin();
+ CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin", false);
return true;
}
void CLangInfo::SetAudioLanguage(const std::string& language)
{
- if (language.empty() || StringUtils::EqualsNoCase(language, "default") || !g_LangCodeExpander.ConvertToThreeCharCode(m_audioLanguage, language))
+ if (language.empty()
+ || StringUtils::EqualsNoCase(language, "default")
+ || StringUtils::EqualsNoCase(language, "original")
+ || !g_LangCodeExpander.ConvertToThreeCharCode(m_audioLanguage, language))
m_audioLanguage.clear();
}
void CLangInfo::SetSubtitleLanguage(const std::string& language)
{
- if (language.empty() || StringUtils::EqualsNoCase(language, "default") || !g_LangCodeExpander.ConvertToThreeCharCode(m_subtitleLanguage, language))
+ if (language.empty()
+ || StringUtils::EqualsNoCase(language, "default")
+ || StringUtils::EqualsNoCase(language, "original")
+ || !g_LangCodeExpander.ConvertToThreeCharCode(m_subtitleLanguage, language))
m_subtitleLanguage.clear();
}