diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-07-04 16:54:55 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-07-04 16:54:55 -0400 |
commit | 99b12cdd16a1fea2740b812d697bea887df2b5bd (patch) | |
tree | 0c3b4c5fc76b9a6ccb922440d03507c4e1e3ed8b | |
parent | 7ca667494e32d110766c2b4a013b6a2c37b8a084 (diff) | |
download | ayatana-indicator-sound-99b12cdd16a1fea2740b812d697bea887df2b5bd.tar.gz ayatana-indicator-sound-99b12cdd16a1fea2740b812d697bea887df2b5bd.tar.bz2 ayatana-indicator-sound-99b12cdd16a1fea2740b812d697bea887df2b5bd.zip |
Set locale and bind text domain
-rw-r--r-- | src/main.vala | 7 | ||||
-rw-r--r-- | vapi/config.vapi | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main.vala b/src/main.vala index 1ec7d2c..97f311f 100644 --- a/src/main.vala +++ b/src/main.vala @@ -1,5 +1,12 @@ +[CCode (cheader_filename="libintl.h", type="char *")] +extern unowned string bind_textdomain_codeset (string domainname, string codeset); + static int main (string[] args) { + bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); + Intl.setlocale (LocaleCategory.ALL, ""); + Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR); + var service = new IndicatorSound.Service (); return service.run (); } diff --git a/vapi/config.vapi b/vapi/config.vapi index 4be6d11..15c4c88 100644 --- a/vapi/config.vapi +++ b/vapi/config.vapi @@ -1,7 +1,7 @@ [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")] namespace Config { public const string GETTEXT_PACKAGE; - public const string LOCALEDIR; + public const string GNOMELOCALEDIR; public const string PKGDATADIR; public const string PACKAGE_NAME; public const string PACKAGE_VERSION; |