You can use
T.force('en')
T.force('it')
T.force('es')
based on request.vars or arguments
ex:
http://myapp/?lang?es
T.force(request.vars.lang)
not sure how to do it with routes
On Sun, May 8, 2011 at 11:47 PM, Miguel Morillo Iruela <
[email protected]> wrote:
> Hello,
>
> I wonder if it is possible to "force" to use an specific language,
> while web2py perform the translation automatically based on user's
> browser language.
>
> This means that although, we use as a default language browser
> "English" we can choose our application in Spanish or Italian (ej:
> http://myapp/es/some/) you will see the translation into Spanish and
> if you choose (ej http://myapp/it/some/) you will see the translation
> into Italian without change our default language browser.
>
> I've been testing with the file routes.py, if anyone knows how to do
> it would be helpful.
>
> Ej:
> routes.py
> .
> .
> .
> routers = dict (
> BASE = dict (default_application = 'myapp')
> myapp = dict (languages = ['en ', 'it',' es',' es-es', 'it-it'],
> default_language = 'en'),
> )
> .
> .
>
>
> Thanks
> Miguel