Introduced user_language to FHC_JS_DATA_STORAGE_OBJECT

This is to retrieve easily user language via Javascript.
Retrieving using the storage will not cause any async issues as an
AJAX Call would do.
This commit is contained in:
Cris
2020-04-02 15:46:07 +02:00
parent 5bd9ece44a
commit fe9e222182
+4 -1
View File
@@ -69,6 +69,8 @@ function generateCSSsInclude($CSSs)
*/
function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
{
$user_language = getUserLanguage();
$toPrint = "\n";
$toPrint .= '<script type="text/javascript">';
$toPrint .= '
@@ -76,7 +78,8 @@ function generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
app_root: "'.APP_ROOT.'",
ci_router: "'.$indexPage.'",
called_path: "'.$calledPath.'",
called_method: "'.$calledMethod.'"
called_method: "'.$calledMethod.'",
user_language: "'.$user_language.'"
};';
$toPrint .= "\n";
$toPrint .= '</script>';