Yes you're right, I don't have any controller en.py or it.py. It was a way 
to change the uri_language.
If I take off 'it' form the URL helper how can i force the language ?
I've read somewhere that it's possible to do it within the URL helper but I 
don't know how.
Now I have:
URL(f=request.function, args= request.args, vars=request.vars)

I've tried with:
URL(f=request.function, args= request.args, vars=request.vars, lang='it')

and with:
URL(f=request.function, args= request.args, vars=request.vars, 
language='it')

But lang and language are not valid: 
unexpected keyword argument 'lang'
Can you help me ?

Il giorno domenica 16 marzo 2014 15:52:39 UTC+1, Anthony ha scritto:
>
> URL(..., args=request.args, vars=request.get_vars) is the right way to 
> construct a URL that includes the args and query string variables from the 
> current request. However, I assume you don't actually have controllers 
> named en.py and it.py, so you shouldn't be passing the language codes as 
> the first argument to URL() (the first argument should be either the app, 
> controller, or function name).
>
> Anthony
>
> On Sunday, March 16, 2014 4:24:38 AM UTC-4, Gael Princivalle wrote:
>
>> Hello all.
>>
>> How can I add to my URL helper all current args and vars ?
>>
>> I would like to do something like that for language switching :
>> My current URL is:
>> mydomain.com/en/concert?id=2
>>
>> With that:
>> URL('it', f=request.function, args=request.args, vars=request.vars)
>> I would like to go to:
>> mydomain.com/it/concert?id=2
>>
>> But the result is:
>> mydomain.com/it/concert
>>
>> Someone knows how I can do that ?
>>
>> Thanks, regards.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to