You can use the session variable $_SESSION["language"] that stores the selected language, e.g., "English" or "Spanish".
Examples
Getting the value of selected language
Use the following function for this purpose.
echo mlang_getcurrentlang();
Setting the current language
To change the current selected language assign a new value directly to the following session variable:
$_SESSION["language"]="English";
See also:
•Localizing PHPRunner applications
•Save user data in session variables