[web2py] Re: language selector in layout.html

2013-04-09 Thread Adham Hassan
You can use the admin page as a example of how to create a language select. I copied the following code with some modifications: web2py/applications/admin/views/layout.html {{=T('Languages')}} {{if hasattr(T,'get_possible_languages_info'):}} {{for langinfo in sorted([(code,info[1])

[web2py] Re: language selector in layout.html

2012-07-05 Thread Anthony
You could add a dropdown for language selection and when the user makes a selection, store the value in the session. Then use T.force('[language code]') in a model file to force translations to the particular language. If you want the selection to be remembered across sessions, you could set a