Find translation files on Linux after Subsurface was installed

So far we only looked in the a local subdirectory, but once Subsurface has
been installed, we don't need to change the search path for translation
files anymore.

Fixes #2

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-10-18 14:30:45 -07:00
parent c78bf18998
commit 834825f406
5 changed files with 17 additions and 6 deletions

View file

@ -151,11 +151,14 @@ const char *subsurface_default_filename()
}
}
const char *subsurface_gettext_domainpath()
const char *subsurface_gettext_domainpath(char *argv0)
{
/* first hackishly make sure that the LANGUAGE information is correctly set up
* in the environment */
char buffer[80];
snprintf(buffer, sizeof(buffer), "LANGUAGE=%s.UTF-8", g_win32_getlocale());
putenv(buffer);
/* always use translation directory relative to install location, regardless of argv0 */
return "./share/locale";
}