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

@@ -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);