Thank for reply.
Alternatively, I am working on redirecting url with lang parameter based on language selection. For this, I am trying to take option from a external html or php page i.e. English or French.
I have tried to get lang option variables into session and in login/index.php, I am trying to redirect the function based on lang session.
The problem is my session lang variable dies in login/index.php of moodle before redirecting.
Can you please mention, how can i sustain my session variable of lang into login/index.php.
I am trying to set condition as follows in index.php file:
if ($_SESSION['lng']) == 'fr'
redirect(new moodle_url(get_login_url()."?lang=fr", array('testsession'=>$USER->id)));
redirect(new moodle_url(get_login_url(), array('testsession'=>$USER->id)));
Any help? Thanks.