summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-20 15:01:03 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-20 15:01:03 +0000
commit7ea72d80eb1ddefc8b43afa682f0bf20e9b67b7d (patch)
tree0a1de6e36b93142d644e3dfb9963e11c5ecaf54b
parent8019a8c5a615d557bf54972f34a9faddebcbb93b (diff)
Try to set gettext up correctly.
-rw-r--r--src/lib/util.cc7
-rw-r--r--src/lib/util.h1
-rw-r--r--src/tools/dvdomatic.cc2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 53bdb4c79..e043f8576 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -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.
diff --git a/src/lib/util.h b/src/lib/util.h
index ec67469c1..60498be5a 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -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);
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index d0e4dd1f2..aa936523d 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -469,6 +469,8 @@ setup_i18n ()
language = wxLANGUAGE_ENGLISH;
}
}
+
+ dvdomatic_setup_i18n (wx_to_std (locale->GetCanonicalName ()));
}
class App : public wxApp