Re: best practice wrt multi-lingual websites, gettext() etc.
| From: | Phpster | Date: | Mon, 26 Jan 2009 01:38:59 +0000 |
| Subject: | Re: best practice wrt multi-lingual websites, gettext() etc. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287129@lists.php.net to get a copy of this message | ||
Dunno if it's a best practice, but I store all the translations in the db for easy manipulation and extraction to a file for others to translate. That obviously involves both import and export utilities.
At work we to the translation in real time thru a render page that combined the data for the form as well as the labels and buttons. Personally I disagree with this approach and feel that caching out the page to either HTML or XML is quicker and cleaner. But that's just me.
A number of pup apps take the approach of storing the label translations in variables inside language folders ( phpmyadmin has this ). That is also not a bad approach but is slightly slower and I can't help but feeling that serving up a static page created by code is a better solution. It will be heavier on the management side, but my experience is that this mgmt activity drops off quickly after the first week or two of that form being in production.
Nth
Bastien
Sent from my iPod
On Jan 25, 2009, at 14:56, Per Jessen <per@computer.org> wrote:
I am writing a small(ish) site which will eventually need to be available in several different languages. This needs to more or less transparent to the user, so I am using Apaches content negotiation features, which is working very well. The issues arise once I start looking at PHP and Javascript code. I use JS for client side input (pre-)validation and increased usability, and error messages and such will obviously need to be language-sensitive. The same goes for the PHP code. With PHP, I've got gettext() for this sort of job, with javascript and some DHTML, I don't seem to have many options. One of my key concerns is - for the translation, I need to be able to wrap everything up and ship it off to a translator, perhaps via elance or similar. Does anyone have any best practice suggestions or comments in general? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php