Gettext will always use system default locale

后端 未结 7 642
孤城傲影
孤城傲影 2020-12-30 09:30

I need to localise a Windows-only PHP web application and I\'m evaluating the gettext extension but I\'m having the hardest time trying to make it work in my Windows 7 devel

7条回答
  •  一整个雨季
    2020-12-30 09:51

    Add a system variable 'LANG' with the desired locale for the value (for example 'en_US' or 'nl_NL'), restart apache and translations corresponding to that locale are shown.

    Environment variables

    This works for XAMPP with php 7.1 (thread safe) on windows 10 and locale directories structured as follows:

        // Directory structure
        \en_US\LC_MESSAGES\bundle.po
        \nl_NL\LC_MESSAGES\bundle.po
        ...
    

提交回复
热议问题