diff options
| author | Debulois <quentin@debulois.fr> | 2022-02-03 13:02:21 +0100 |
|---|---|---|
| committer | Debulois <quentin@debulois.fr> | 2022-02-03 13:02:21 +0100 |
| commit | 5ddf8de3691fde866c5a48b440cffa2990b2014c (patch) | |
| tree | e19215cb4a699ed767c731f65d3f796b4435530a /Wrapper/Functions/func_language.php | |
Initial commit
Diffstat (limited to 'Wrapper/Functions/func_language.php')
| -rw-r--r-- | Wrapper/Functions/func_language.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Wrapper/Functions/func_language.php b/Wrapper/Functions/func_language.php new file mode 100644 index 0000000..ae54da0 --- /dev/null +++ b/Wrapper/Functions/func_language.php @@ -0,0 +1,16 @@ +<?php +// **************************************************************************** +// Description: Modification de la variable lang de la session +// qui sert à définir quel dossier de language importer +// **************************************************************************** +function set_language($language) { + $_SESSION["lang"] = $language; + // Redirection vers la page actuelle avec la langue à affiche. + if ($_SESSION["src"] == "index") { + header("Location: /".$_SESSION["src"].".php"); + } else { + header("Location: /Views/".$_SESSION["src"].".php"); + } + die(); +} +?>
\ No newline at end of file |
