diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-15 09:37:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-15 09:37:09 -0700 |
commit | 4b9a59a1546d8a53b8bf6e53c11823299b22edb7 (patch) | |
tree | 64541d2be57278d32ef7f3177318e1870c1ac7f4 /macos.c | |
parent | 21dec2a13433f7b9518aec0059caae2780be0dde (diff) | |
parent | ef039c9d32e998af3ceab21673a51169f6e4f1ed (diff) | |
download | subsurface-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.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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); |