Replace $html_lang by $locale
This commit is contained in:
parent
d73ca37f5c
commit
7b4bc4ad7f
@ -51,10 +51,10 @@ class Utils {
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public static function print_header($title = '') {
|
public static function print_header($title = '') {
|
||||||
global $html_lang;
|
global $locale;
|
||||||
|
|
||||||
echo '<!DOCTYPE html>
|
echo '<!DOCTYPE html>
|
||||||
<html lang="' . $html_lang . '">
|
<html lang="' . $locale . '">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />';
|
<meta charset="utf-8" />';
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class Utils {
|
|||||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/jquery-1.11.1.min.js"></script>
|
<script type="text/javascript" src="' . self::get_server_name() . 'js/jquery-1.11.1.min.js"></script>
|
||||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap.min.js"></script>
|
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap-datepicker.js"></script>
|
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap-datepicker.js"></script>
|
||||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/locales/bootstrap-datepicker.' . $html_lang . '.js"></script>
|
<script type="text/javascript" src="' . self::get_server_name() . 'js/locales/bootstrap-datepicker.' . $locale . '.js"></script>
|
||||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/core.js"></script>';
|
<script type="text/javascript" src="' . self::get_server_name() . 'js/core.js"></script>';
|
||||||
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/nav/nav.js")) {
|
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/nav/nav.js")) {
|
||||||
echo '<script src="/nav/nav.js" id="nav_js" type="text/javascript" charset="utf-8"></script><!-- /Framanav -->';
|
echo '<script src="/nav/nav.js" id="nav_js" type="text/javascript" charset="utf-8"></script><!-- /Framanav -->';
|
||||||
|
@ -27,7 +27,7 @@ if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'
|
|||||||
$_SESSION['lang'] = $_POST['lang'];
|
$_SESSION['lang'] = $_POST['lang'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <html lang="$html_lang"> */
|
/* <html lang="$locale"> */
|
||||||
$i18n->get('Something, just to load the dictionary');
|
$i18n->get('Something, just to load the dictionary');
|
||||||
$locale = $i18n->getLoadedLang();
|
$locale = $i18n->getLoadedLang();
|
||||||
|
|
||||||
|
@ -57,12 +57,12 @@ function bandeau_titre($titre)
|
|||||||
|
|
||||||
function liste_lang()
|
function liste_lang()
|
||||||
{
|
{
|
||||||
global $ALLOWED_LANGUAGES; global $html_lang;
|
global $ALLOWED_LANGUAGES; global $locale;
|
||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
|
|
||||||
foreach ($ALLOWED_LANGUAGES as $k => $v ) {
|
foreach ($ALLOWED_LANGUAGES as $k => $v ) {
|
||||||
if (substr($k,0,2)==$html_lang) {
|
if (substr($k,0,2)==$locale) {
|
||||||
$str .= '<option lang="'.substr($k,0,2).'" selected value="' . $k . '">' . $v . '</option>' . "\n" ;
|
$str .= '<option lang="'.substr($k,0,2).'" selected value="' . $k . '">' . $v . '</option>' . "\n" ;
|
||||||
} else {
|
} else {
|
||||||
$str .= '<option lang="'.substr($k,0,2).'" value="' . $k . '">' . $v . '</option>' . "\n" ;
|
$str .= '<option lang="'.substr($k,0,2).'" value="' . $k . '">' . $v . '</option>' . "\n" ;
|
||||||
|
@ -232,7 +232,7 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
|
|||||||
<p>' . __('Step 2 classic', 'To make a generic poll you need to propose at least two choices between differents subjects.') . '</p>
|
<p>' . __('Step 2 classic', 'To make a generic poll you need to propose at least two choices between differents subjects.') . '</p>
|
||||||
<p>' . __('Step 2 classic', 'You can add or remove additional choices with the buttons') . ' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . __('Generic', 'Remove') . '</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . __('Generic', 'Add') . '</span></p>';
|
<p>' . __('Step 2 classic', 'You can add or remove additional choices with the buttons') . ' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">' . __('Generic', 'Remove') . '</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">' . __('Generic', 'Add') . '</span></p>';
|
||||||
if ($config['user_can_add_img_or_link']) {
|
if ($config['user_can_add_img_or_link']) {
|
||||||
echo ' <p>' . __('Step 2 classic', 'It\'s possible to propose links or images by using') . ' <a href="http://' . $html_lang . '.wikipedia.org/wiki/Markdown">' . __('Step 2 classic', 'the Markdown syntax') . '</a>.</p>';
|
echo ' <p>' . __('Step 2 classic', 'It\'s possible to propose links or images by using') . ' <a href="http://' . $locale . '.wikipedia.org/wiki/Markdown">' . __('Step 2 classic', 'the Markdown syntax') . '</a>.</p>';
|
||||||
}
|
}
|
||||||
echo ' </div>' . "\n";
|
echo ' </div>' . "\n";
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<script type="text/javascript" src="{'js/jquery-1.11.1.min.js'|resource}"></script>
|
<script type="text/javascript" src="{'js/jquery-1.11.1.min.js'|resource}"></script>
|
||||||
<script type="text/javascript" src="{'js/bootstrap.min.js'|resource}"></script>
|
<script type="text/javascript" src="{'js/bootstrap.min.js'|resource}"></script>
|
||||||
<script type="text/javascript" src="{'js/bootstrap-datepicker.js'|resource}"></script>
|
<script type="text/javascript" src="{'js/bootstrap-datepicker.js'|resource}"></script>
|
||||||
<script type="text/javascript" src="{"js/locales/bootstrap-datepicker.$html_lang.js"|resource}"></script>
|
<script type="text/javascript" src="{"js/locales/bootstrap-datepicker.$locale.js"|resource}"></script>
|
||||||
<script type="text/javascript" src="{'js/core.js'|resource}"></script>
|
<script type="text/javascript" src="{'js/core.js'|resource}"></script>
|
||||||
|
|
||||||
{if !empty($nav_js)}
|
{if !empty($nav_js)}
|
||||||
|
Loading…
Reference in New Issue
Block a user