aboutsummaryrefslogtreecommitdiffstats
path: root/windows.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-18 14:30:45 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-18 14:30:45 -0700
commit834825f4061b1d74f6925233cdf9d1be1fdcc8f7 (patch)
treef68942e383dc44432be1115c29abe997f271f3a9 /windows.c
parentc78bf189985b89941aab1861145b99f7f61c2013 (diff)
downloadsubsurface-834825f4061b1d74f6925233cdf9d1be1fdcc8f7.tar.gz
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>
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/windows.c b/windows.c
index 4aa05a22b..1c8cd0a01 100644
--- a/windows.c
+++ b/windows.c
@@ -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";
}