Localization with gettext() on windows 10

Hi, I’m starting to develop with GTK on Windows, is there a way to make gettext() work on windows?

There are already binaries for windows https://mlocati.github.io/articles/gettext-iconv-windows.html

gettext is already available on MSYS2 and it’s also built by gvsbuild if you want a Visual Studio-based toolchain.

For python use MSYS2+pyinstaller and try add this lines .

    if sys.platform.startswith('win'):
        import locale
        if os.getenv('LANG') is None:
            lang, enc = locale.getdefaultlocale()
            os.environ['LANG'] = lang
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.