Try to set gettext up correctly.
authorCarl Hetherington <cth@carlh.net>
Wed, 20 Mar 2013 15:01:03 +0000 (15:01 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 20 Mar 2013 15:01:03 +0000 (15:01 +0000)
src/lib/util.cc
src/lib/util.h
src/tools/dvdomatic.cc

index 53bdb4c79241c3868ec598ccc2fead4315747bc1..e043f8576a8a18ce8f1a47ee0df2375b5cb73c4d 100644 (file)
@@ -249,6 +249,13 @@ dvdomatic_setup ()
        ui_thread = this_thread::get_id ();
 }
 
+void
+dvdomatic_setup_i18n (string lang)
+{
+       bindtextdomain ("libdvdomatic", LOCALE_PREFIX);
+       setlocale (LC_ALL, lang.c_str ());
+}
+
 /** @param start Start position for the crop within the image.
  *  @param size Size of the cropped area.
  *  @return FFmpeg crop filter string.
index ec67469c16ebb7fddc9c7731c4cc1f3a07e8f61a..60498be5a90a5ff762b886f2c314f7dad1d4d66c 100644 (file)
@@ -54,6 +54,7 @@ extern void stacktrace (std::ostream &, int);
 extern std::string dependency_version_summary ();
 extern double seconds (struct timeval);
 extern void dvdomatic_setup ();
+extern void dvdomatic_setup_i18n (std::string);
 extern std::vector<std::string> split_at_spaces_considering_quotes (std::string);
 extern std::string md5_digest (std::string);
 extern std::string md5_digest (void const *, int);
index d0e4dd1f274c5c341ba1b14728901112453348cd..aa936523d30585f24611660a85425f07274d6f49 100644 (file)
@@ -469,6 +469,8 @@ setup_i18n ()
                        language = wxLANGUAGE_ENGLISH;
                }
        }
+
+       dvdomatic_setup_i18n (wx_to_std (locale->GetCanonicalName ()));
 }
 
 class App : public wxApp