+void
+setup_i18n ()
+{
+ int language = wxLANGUAGE_DEFAULT;
+
+ if (wxLocale::IsAvailable (language)) {
+ locale = new wxLocale (language, wxLOCALE_LOAD_DEFAULT);
+
+#ifdef __WXGTK__
+ locale->AddCatalogLookupPathPrefix (wxT (LOCALE_DIR));
+#endif
+
+ locale->AddCatalog ("libdvdomatic-wx");
+ locale->AddCatalog ("dvdomatic");
+
+ if (!locale->IsOk()) {
+ delete locale;
+ locale = new wxLocale (wxLANGUAGE_ENGLISH);
+ language = wxLANGUAGE_ENGLISH;
+ }
+ }
+}
+