add and use LOCALEDIR variable; move LOCALEDIR_VAR to global.h

Origin commit data
------------------
Branch: ni/coolstream
Commit: 910497f762
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-05-06 (Wed, 06 May 2015)

Origin message was:
------------------
- add and use LOCALEDIR variable; move LOCALEDIR_VAR to global.h

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2015-05-06 10:33:50 +02:00
parent 5632cf2d2a
commit c2486e880b
7 changed files with 14 additions and 7 deletions

View File

@@ -76,10 +76,11 @@ void CLanguage::setLanguage(std::string _language){
ConfigLanguage->loadConfig(language_dir + "/" + _language);
DefaultLanguage->loadConfig(language_dir + "/" + HTTPD_DEFAULT_LANGUAGE);
const char * path[2] = { "/var/tuxbox/locale/", DATADIR "/neutrino/locale/"};
const char * path[2] = { LOCALEDIR_VAR, LOCALEDIR };
for (int i = 0; i < 2; i++)
{
std::string filename = path[i];
filename += "/";
filename += g_settings.language;
filename += ".locale";
@@ -89,7 +90,7 @@ void CLanguage::setLanguage(std::string _language){
}
else if (i == 1) {
// load neutrino default language (should not happen)
NeutrinoLanguage->loadConfig(DATADIR "/neutrino/locale/english.locale", ' ');
NeutrinoLanguage->loadConfig(LOCALEDIR "/english.locale", ' ');
}
}
}