mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- add and use LOCALEDIR variable; move LOCALEDIR_VAR to global.h
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user