Also look for the localized version of files in the locale/ directory

ver1_5_1
Christophe Teyssier 2008-03-08 16:54:31 +00:00
parent 4e21886417
commit 40773e0897
1 changed files with 9 additions and 2 deletions

View File

@ -75,8 +75,15 @@ string LocaleFilename(const string & filename)
{
localeFilename = filename + '_' + _("LANGUAGE");
}
if (stat(localeFilename.c_str(), &filestat) != 0) {
localeFilename = filename;
if (stat(localeFilename.c_str(), &filestat) != 0)
{
localeFilename = string("locale/") + localeFilename;
if (stat(localeFilename.c_str(), &filestat) != 0)
{
localeFilename = filename;
}
}
return localeFilename;
}