Gettext not working on bluehost
I just installed a website on a bluehost hosting and the text does not get translated. Note that the exact same code wor开发者_StackOverflow中文版ks locally.
I have installed the Gettext extension and it appears as enabled in phpinfo(). I have tested with a relative or an absolute path and both do not work.
I'm aware of the fact that Apache has to be restarted when modifying a .mo file but in my case, I have just uploaded them for the first time so it should not be the root cause.
Any help will be greatly appreciated.
Thanks in advance.
Because you don't say anything about an error and that "the text does not get translated" I think you have a problem with the language settings.
When everything seems to work but your text does not get translated then the translator does not see it's worth translating. Have you checked all your language settings on the host?
In case you have an error message please update your question with the error
There may be different locales installed on the server or they may be installed using different names. This is often the case if you have developed with windows and are deploying on linux.
Do your setlocale() calls return the expected locale name?
If you have shell access you can list the locales installed using locale -a
On debian/ubuntu servers install the locales-all package to install all locales. I'm sure red hat must have something similar.
精彩评论