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

This commit is contained in:
svenhoefer
2015-05-06 10:33:50 +02:00
parent abc145fa78
commit 910497f762
7 changed files with 14 additions and 7 deletions

View File

@@ -34,6 +34,7 @@
#include <config.h>
#endif
#include <global.h>
#include <system/localize.h>
#include <system/locals_intern.h>
@@ -108,8 +109,7 @@ CLocaleManager::~CLocaleManager()
::free(defaultDataMem);
}
#define LOCALEDIR_VAR "/var/tuxbox/locale/"
const char * path[2] = { LOCALEDIR_VAR, DATADIR "/neutrino/locale/"};
const char * path[2] = { LOCALEDIR_VAR, LOCALEDIR };
CLocaleManager::loadLocale_ret_t CLocaleManager::loadLocale(const char * const locale, bool asdefault)
{
@@ -131,6 +131,7 @@ CLocaleManager::loadLocale_ret_t CLocaleManager::loadLocale(const char * const l
for (unsigned int i = 0; i < 2; i++)
{
std::string filename = path[i];
filename += "/";
filename += locale;
filename += ".locale";
::stat(filename.c_str(), &st);