Skip to content
Snippets Groups Projects
Commit a53b05d2 authored by Boris's avatar Boris
Browse files

FIX: amend locales handling

parent 019577ad
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,6 @@ $bodyIds = !isset($bodyIds) ? '' : $bodyIds; ...@@ -53,8 +53,6 @@ $bodyIds = !isset($bodyIds) ? '' : $bodyIds;
</head> </head>
<body id="<?php echo $bodyIds; ?>"> <body id="<?php echo $bodyIds; ?>">
<?php <?php
textdomain("menu");
$menu = $menu =
array( array(
[ [
......
...@@ -6,8 +6,6 @@ defineLang(); ...@@ -6,8 +6,6 @@ defineLang();
putenv('LC_ALL='. LANG_FOLDER); putenv('LC_ALL='. LANG_FOLDER);
setlocale(LC_ALL, LOCALE_CODE); setlocale(LC_ALL, LOCALE_CODE);
textdomain("menu");
if (!isset($_GET['page'])) { if (!isset($_GET['page'])) {
$page = NULL; $page = NULL;
...@@ -25,37 +23,37 @@ $router = ...@@ -25,37 +23,37 @@ $router =
array( array(
[ [
'permalink' => '/', 'permalink' => '/',
'i18nedPermalink' => _('/'), 'i18nedPermalink' => dgettext('menu', '/'),
'tpl' => 'home.php' 'tpl' => 'home.php'
], ],
[ [
'permalink' => '/fonctionnalites', 'permalink' => '/fonctionnalites',
'i18nedPermalink' => _('/fonctionnalites'), 'i18nedPermalink' => dgettext('menu', '/fonctionnalites'),
'tpl' => 'features.php' 'tpl' => 'features.php'
], ],
[ [
'permalink' => '/telechargement', 'permalink' => '/telechargement',
'i18nedPermalink' => _('/telechargement'), 'i18nedPermalink' => dgettext('menu', '/telechargement'),
'tpl' => 'download.php' 'tpl' => 'download.php'
], ],
[ [
'permalink' => '/merci', 'permalink' => '/merci',
'i18nedPermalink' => _('/merci'), 'i18nedPermalink' => dgettext('menu', '/merci'),
'tpl' => 'funding.php' 'tpl' => 'funding.php'
], ],
[ [
'permalink' => '/tutoriel-cesium', 'permalink' => '/tutoriel-cesium',
'i18nedPermalink' => _('/tutoriel-cesium'), 'i18nedPermalink' => dgettext('menu', '/tutoriel-cesium'),
'tpl' => 'tuto.php' 'tpl' => 'tuto.php'
], ],
[ [
'permalink' => '/developpeurs', 'permalink' => '/developpeurs',
'i18nedPermalink' => _('/developpeurs'), 'i18nedPermalink' => dgettext('menu', '/developpeurs'),
'tpl' => 'jobs.php' 'tpl' => 'jobs.php'
], ],
[ [
'permalink' => '/mentions-legales', 'permalink' => '/mentions-legales',
'i18nedPermalink' => _('/mentions-legales'), 'i18nedPermalink' => dgettext('menu', '/mentions-legales'),
'tpl' => 'legal-notice.php' 'tpl' => 'legal-notice.php'
] ]
); );
...@@ -69,7 +67,7 @@ foreach ($router as $route) ...@@ -69,7 +67,7 @@ foreach ($router as $route)
{ {
$found = true; $found = true;
$pagePermalink = $route['permalink']; $pagePermalink = $route['permalink'];
$pageIsHome = ($route['i18nedPermalink'] == _('/')) ? true : false; $pageIsHome = ($route['i18nedPermalink'] == dgettext('menu', '/')) ? true : false;
include('tpl/' . $route['tpl']); include('tpl/' . $route['tpl']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment