Thanks Alan you're right.
But with this routes.py in web2py root :
routers = dict(
    BASE=dict(
        default_application='test',
    ),
)

And this routes.py in test folder:
from fileutils import abspath
from languages import read_possible_languages
possible_languages = read_possible_languages(abspath('applications', test))
routers = {
    test: dict(
        default_language = possible_languages['default'][0],
        languages = [lang for lang in possible_languages
                           if lang != 'default']
    )
}
I've got this server error:
200 Error 

The server encountered an internal error or misconfiguration and was unable 
to complete your request. Please contact the server administrator, [no 
address given] and inform them of the time the error occurred, and anything 
you might have done that may have caused the error. More information about 
this error may be available in the server error log.
I've tried also like in the web2py book with only one routes.py file in the 
web2py root folder:
routers = dict(
    BASE  = dict(default_application='test'),
    test = dict(languages=['en', 'it'], default_language='it'),
)

And it works. I'm gone make more test.



Il giorno domenica 12 gennaio 2014 15:57:32 UTC+1, Alan Etkin ha scritto:
>
> Is it possible that nobody knows how this request.uri.language works ?
>>
>
> Shouldn't this
>
>     app: dict(
>
> be this way instead?
>
>     test: dict(
>  
>

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

Reply via email to