Force language change from custom account creation script through url

Posted by jax on Stack Overflow See other posts from Stack Overflow or by jax
Published on 2010-06-07T16:48:33Z Indexed on 2010/06/07 16:52 UTC
Read the original article Hit count: 180

Filed under:
|

I have made a custom 'Account Creation' script so that users can login from my phone application.

What I want is to be able to change the responses from the server depending on their locale. So when I request a page I would add lang=en or lang=zh etc.

This works

http://mysite.com/phone/my_custom_account_creation.php?lang=en

Response:

<resource classification="error" code="Error (Code: 500)"> 
<message>Please enter your name:</message> 
</resource>

This does not work:

http://mysite.com/phone/my_custom_account_creation.php?lang=zh

Response:

<resource classification="error" code="Error (Code: 500)"> 
<message>Please enter your name:</message> 
</resource>

If I go into Joomla at set the default language to chinese, it works.

<resource classification="error" code="Error (Code: 500)"> 
<message>????????</message> 
</resource>

but

http://mysite.com/phone/my_custom_account_creation.php?lang=en does not work, instead it continues to show the chinese version.

What might I be able to do here?

© Stack Overflow or respective owner

Related posts about joomla

Related posts about joomla1.5