language translation in php
php, translation
Solution
I've been looking for an answer to this question as well and even though I couldn't solve it with php I think it can be done with google's language api.
There appears to be a standard way of doing what you want to in php, I think it's what wordpress uses http://codex.wordpress.org/Translating_WordPress and it's very similar to you making your own dynamic translation system, you can also do this with zend apparently.
But going back to the google api, what you could do is asking the user their language of preference and save that variable either in a cookie, session, or database, then pass that variable to the api and let it handle the translation.
Problem
How is language translation handled in PHP? I need to change the language of a site based on user preferences. Also, I may not have access to the client source code. At most, I could upload a folder of my own and do the dynamic translation myself. As far as I know, the basic process would be: Send Language 1 output to global function -> translate -> Output to screen. I need someone to help me out with the specifics in PHP. Are there any standard implementations that I am unaware of? Has anybody done such a thing and if so, how did you do it? Thanks.