Force language change from custom account creation script through url
- by jax
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?