read the book, I think it's explained clearly.... set_current_language sets 
all languages that DON'T need translation (i.e., the default language you 
used when coding), if multiple languages are accepted by the client.

http://web2py.com/books/default/chapter/29/04#Determining-the-language

Il giorno mercoledì 29 maggio 2013 09:56:44 UTC+2, Daniel Gonzalez ha 
scritto:
>
> And a final question: since I will only be supporting a handful of 
> languages (english, german and italian) I would like to set the current 
> languages. I have found T.set_current_languages. Is this the right function 
> to set the supported languages? Is there an example somewhere on how to use 
> this function?
>
> I would go with something like: T.set_current_languages(['en', 'it', 
> 'de']) in my model, but I am not sure that is the right way to use it.
> I have tried (in models/0.py):
>
> T.set_current_languages(['it', 'de', 'en'])
>
> But I get:
>
> <type 'exceptions.IOError'> [Errno 2] No such file or directory: 
> /xxx/applications/example/languages/en-us.py'
>
> I also get that if I remove 'en': T.set_current_languages(['it', 'de'])
>

-- 

--- 
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/groups/opt_out.


Reply via email to