Are there guidelines or state of the art ways to localize a PHP/MySQL website?
The idea here is to translate buttons, page titles and messages. The language of the website would be chosen at installation time and shouldn’t change.
I have started creating text files containing lists of keywords with their translation, but it feels like reinventing the wheel.
Thank you for your help.
In the meantime, I found about an efficient way to build the array text file.
Wherever I want to translate a text item, I use the php gettext() function aliased _() to encapsulate it.
Then, with poedit I parse all my php files an create the translations automatically.
My generated .po (human readable) and .mo (compiled) localization files are put in:
I then initialize my translation application with this code:
PROS:
creating new translations can be done by non programmers.