mirror of
https://github.com/24eme/signaturepdf
synced 2024-05-21 07:06:41 +02:00
Language use for traduction
This commit is contained in:
parent
277e1669c3
commit
3c962b9a68
6
app.php
6
app.php
|
@ -44,16 +44,18 @@ if ($f3->get('GET.lang')) {
|
|||
} elseif (isset($_COOKIE['LANGUAGE'])) {
|
||||
changeLanguage($_COOKIE['LANGUAGE'], $f3);
|
||||
}
|
||||
|
||||
bindtextdomain('application', $f3->get('ROOT')."/locale/");
|
||||
textdomain('application');
|
||||
|
||||
function changeLanguage($lang, $f3) {
|
||||
$_SESSION['LANGUAGE'] = $lang;
|
||||
setcookie("LANGUAGE", $lang, strtotime('+1 year'));
|
||||
putenv("LANGUAGE=$lang");
|
||||
$f3->set('LANGUAGE', $lang);
|
||||
getenv("LANGUAGE=$lang");
|
||||
}
|
||||
|
||||
$f3->set('LANGUAGE', _("en"));
|
||||
|
||||
$f3->route('GET /',
|
||||
function($f3) {
|
||||
$f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="fr_FR">
|
||||
<html lang="<?php echo $LANGUAGE ?>"<?php if($LANGUAGE == 'ar'): ?> dir="ltr" style="direction: ltr;"<?php endif;?>>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="fr_FR">
|
||||
<html lang="<?php echo $LANGUAGE ?>"<?php if($LANGUAGE == 'ar'): ?> dir="ltr" style="direction: ltr;"<?php endif;?>>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="fr_FR">
|
||||
<html lang="<?php echo $LANGUAGE ?>"<?php if($LANGUAGE == 'ar'): ?> dir="ltr" style="direction: ltr;"<?php endif;?>>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<html lang="<?php echo $LANGUAGE ?>"<?php if($LANGUAGE == 'ar'): ?> dir="ltr" style="direction: ltr;"<?php endif;?>>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
|
|
Loading…
Reference in a new issue