summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-15 09:37:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-15 09:37:09 -0700
commit4b9a59a1546d8a53b8bf6e53c11823299b22edb7 (patch)
tree64541d2be57278d32ef7f3177318e1870c1ac7f4 /macos.c
parent21dec2a13433f7b9518aec0059caae2780be0dde (diff)
parentef039c9d32e998af3ceab21673a51169f6e4f1ed (diff)
downloadsubsurface-4b9a59a1546d8a53b8bf6e53c11823299b22edb7.tar.gz
Merge branch 'gettext'
Bring all the localization changes into master in preparation for Subsurface 2.1
Diffstat (limited to 'macos.c')
-rw-r--r--macos.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/macos.c b/macos.c
index 3cc4ddf1e..3d9c9b5cd 100644
--- a/macos.c
+++ b/macos.c
@@ -104,6 +104,19 @@ const char *subsurface_default_filename()
}
}
+const char *subsurface_gettext_domainpath()
+{
+ CFBundleRef mainBundle = CFBundleGetMainBundle();
+ CFURLRef localeURL = CFBundleCopyResourceURL(mainBundle, CFSTR("locale"), CFSTR(""), NULL);
+ if (localeURL) {
+ CFStringRef localePath = CFURLCopyFileSystemPath(localeURL, kCFURLPOSIXPathStyle);
+ CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
+ const char *path = CFStringGetCStringPtr(localePath, encodingMethod);
+ return path;
+ }
+ return "./locale";
+}
+
static void show_main_window(GtkWidget *w, gpointer data)
{
gtk_widget_show(main_window);