The parametric router allows:

routers = dict(
    # base router
    BASE = dict(
        default_application = app,
    ),
    app = dict(
        default_language = 'en',
        languages = ['en', 'it', 'pt', 'pt-br'],
    ),
)

and than in the model you do:

T.force(request.lang)

Not clear whether anybody has ever tested this.

Massimo


On Aug 29, 2:26 pm, Alexander Cabezas <alexcabez...@gmail.com> wrote:
> I want to change the application language through URL function, but
> this doesn't expect the "lang" parameter.
>
> I did some tests with these adresseshttp://127.0.0.1:8000/es-es/default/index
> andhttp://127.0.0.1:8000/fr-fr/default/indexand it changed the
> application language due to "gluon.rewrite".
>
> But I want to do this with URL function in order to put in the website
> a Language Selector (SELECT and A tag).
>
> Massimo or somebody else, any clue?

Reply via email to