diff --git a/app.php b/app.php index 6bd84e6..9d64313 100644 --- a/app.php +++ b/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'); diff --git a/templates/compress.html.php b/templates/compress.html.php index fb199c5..ec589d1 100644 --- a/templates/compress.html.php +++ b/templates/compress.html.php @@ -1,5 +1,5 @@ - + dir="ltr" style="direction: ltr;"> diff --git a/templates/metadata.html.php b/templates/metadata.html.php index 78685c9..ccf6538 100644 --- a/templates/metadata.html.php +++ b/templates/metadata.html.php @@ -1,5 +1,5 @@ - + dir="ltr" style="direction: ltr;"> diff --git a/templates/organization.html.php b/templates/organization.html.php index df4d086..6d5703f 100644 --- a/templates/organization.html.php +++ b/templates/organization.html.php @@ -1,5 +1,5 @@ - + dir="ltr" style="direction: ltr;"> diff --git a/templates/signature.html.php b/templates/signature.html.php index 0f1ac28..98a3f6c 100644 --- a/templates/signature.html.php +++ b/templates/signature.html.php @@ -1,5 +1,5 @@ - + dir="ltr" style="direction: ltr;">