mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
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:
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user