How to enable locale en_EN on centOS to get i18n gettext working
-
21-08-2019 - |
Question
I have a development version of my PHP website and when I moved it to my production server on centOS OS I discovered my locale version of en_EN is not working.
Could you please tell me what can cause that and what to do to get this working? I use setlocale and gettext to use i18n in PHP.
Solution
I wouldn't recommend anyone using setlocale()
and gettext()
for localization in PHP (there are some serious issues that will drive any developer nuts). But anyway, there is no en_EN locale. The identifier before the underscore is the language (en = English), the identifier after the underscore is the country (EN = ???). You probably should be using en_US, en_GB, or something else.
OTHER TIPS
I don't think en_EN is correct, Perhaps you mean en_US?