add variant of Rect::expand() that allows different amounts in each direction
[ardour.git] / gtk2_ardour / main.cc
index 8cc72a6284d3e5ee3d3bed4866f643bd55aa1ca6..a123631a54cc0f2b3219b919e67f2f8767a49e9e 100644 (file)
 */
 
 #include <cstdlib>
-#include <signal.h>
 #include <cerrno>
 #include <vector>
 
+#include <signal.h>
+#include <locale.h>
+
 #include <sigc++/bind.h>
 #include <gtkmm/settings.h>
 
@@ -56,7 +58,7 @@
 #include "enums.h"
 #include "bundle_env.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 #ifdef PLATFORM_WINDOWS
 #include <fcntl.h> // Needed for '_fmode'
@@ -294,7 +296,13 @@ int main (int argc, char *argv[])
 #endif
 
 #ifdef ENABLE_NLS
-       gtk_set_locale ();
+       /* initialize C and C++ locales to user preference */
+       setlocale (LC_ALL, "");
+       try {
+               std::locale::global (std::locale (setlocale (LC_ALL, 0)));
+       } catch (...) {
+               std::cerr << "Cannot set C++ locale\n";
+       }
 #endif
 
        console_madness_begin();