Selecting language while connecting to LemonLDAP
First of all, thank you for your hard work.
During our migration process to LemonLDAP (while creating a new skin) I have encountered a problem concerning the ability to select a language (instead of the browser's language sent in the HTTP header "Accept Languague").
Currently, during the connexion process, my app's users can select which language to choose regardless of the browser's language (which is used by default if the user hasn't choosen a diffrent one). Users can also specify a language in the query string (i.e. http://example.com?lang=fr).
So is there any way to do this with LemonLDAP's skins ? basically, what I want to do is to add some flags in the login page and if the user clicks the flag, I respond with the page translated in the selected language and I continue using the selected language.
I have thought of some solutions (but none of them is appealing enough) :
Updating the "Accept-Language" header by adding the value of the LANG param (extracted from the QUERY-STRING) using a lemonldap's custom function.
Updating the "Accept-Language" header or the environment variable "HTTP_ACCEPT_LANGUAGE" using a LL::NG Handler
Updating the "Accept-Language" header by prepending the value of the LANG param (extracted from the QUERY-STRING and transformed to correct format) using Apache's mods --> I don't know how to preprend the param's value to the header.
Creating a patch to the "extract_lang" method to accept other entries.
Should I use one of them or is there a better method ?
Thank you very much (and sorry for the lengthy mail),
Best regards, Iheb