From https://blog.mozilla.org/l10n/2019/04/02/changing-the-language-of-firefox-directly-from-the-browser/
*Language SettingsIn Firefox there are two main user facing settings related to languages:* - *Web content: when you visit a web page, the browser will communicate to the server which languages you’d like to see content in. Technically, this is done by sending an Accept-Language HTTP header, which contains a list of locale codes in the user’s preferred order.* - *User interface: the language in which you want to see the browser (menus, preferences, etc.).* *The difference between the two is not as intuitive as it might seem. A lot of users change the web content settings, and expect the user interface to change.* There you can see how to handle this. Hope, it helps! On Thursday, September 10, 2020 at 10:37:40 AM UTC+2 [email protected] wrote: > Hello All, > > I will try to present my problem simply : > I have a web2py application with a very simply homepage user.html > > User and Password labels & Login Button are automatically translatedby > Firefox > in Firefox the detected langage > > If a user enter login / password > I check user permissions and I show HTML page according to its permissions > by using some code already test as : > > lastUserLogged = db(db.auth_event.description.contains('connect' > )).select(orderby=~db.auth_event.time_stamp,limitby=(0, 1 > )).first().user_id > > and > > lastUserName = db(db.auth_user.id == > lastUserLogged).select(db.auth_user.username).first().username > > > In a native Firefox langage it's OK > But if I download new langage for Firefox restarts firefox and retry > all the permissions are allowed even if the user is not allowed to see > HTML pages > > Why ?? > I don't know but if you can help me I appreciate ... sincerly > > > The HTML Page for the user.html > > > <body> > <style type="text/css"> > body { > overflow:hidden; > } > #fond { > position:absolute; > top:0; > left:0; > } > #web2py_user_form { > position:absolute; > top:50px; > left:50px; > } > #auth_user_username__label{color:white;} > #auth_user_password__label{color:white;} > #auth_user_first_name__label{color:white;} > #auth_user_last_name__label{color:white;} > #auth_user_email__label{color:white;} > #auth_user_password_two__row{color:white;} > > #fond,#fond img { > width:100%; > height:100%; > } > </style> > <div id="fond"> > <img src='/me/static/theme/images/WALLPAPERS/wallpaper.jpg' alt="fond" /> > </div> > <div id="web2py_user_form"> > {{ > =form > }} > </div> > > <script language="javascript"><!-- > jQuery("#web2py_user_form input:visible:enabled:first").focus(); > {{if request.args(0)=='register':}} > web2py_validate_entropy(jQuery('#auth_user_password'),100); > {{elif request.args(0) in ('change_password','reset_password'):}} > web2py_validate_entropy(jQuery('#no_table_new_password'),100); > {{pass}} > //--></script> > > </body> > > > > > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/47d4b550-8043-47ce-b5c2-9bd17441d40bn%40googlegroups.com.

