summaryrefslogtreecommitdiffstats
path: root/macos.c
diff options
context:
space:
mode:
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);