X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb6a4098a0f2e9ae55e72ad960b3dfc134d177c9..d14a1e28567de23c586bc80017073d0c39f8d18f:/wxPython/src/_intl_ex.py?ds=inline diff --git a/wxPython/src/_intl_ex.py b/wxPython/src/_intl_ex.py new file mode 100644 index 0000000000..bfab10096f --- /dev/null +++ b/wxPython/src/_intl_ex.py @@ -0,0 +1,19 @@ +#---------------------------------------------------------------------------- +# wxGTK sets the locale when initialized. Doing this at the Python +# level should set it up to match what GTK is doing at the C level. +if wx.Platform == "__WXGTK__": + try: + import locale + locale.setlocale(locale.LC_ALL, "") + except: + pass + +# On MSW add the directory where the wxWindows catalogs were installed +# to the default catalog path. +if wx.Platform == "__WXMSW__": + import os + localedir = os.path.join(os.path.split(__file__)[0], "locale") + Locale_AddCatalogLookupPathPrefix(localedir) + del os + +#----------------------------------------------------------------------------