Add galician and basque + add forced change language when using get param

See BT#10815
1.10.x
jmontoya 10 years ago
parent 870361f06a
commit 1fc0137abf
  1. 13
      custompages/language.php
  2. 5
      main/inc/global.inc.php

@ -35,8 +35,17 @@ function custompages_get_lang($variable) {
return get_lang($variable, null, $_SESSION['user_language_choice']);
}
$available_langs = array('en', 'fr', 'es');
$chamilo_langs = array(null => 'english', 'en' => 'english', 'fr' => 'french', 'nl' => 'dutch', 'de' => 'german', 'es' => 'spanish');
$available_langs = array('en', 'fr', 'es', 'gl', 'eu');
$chamilo_langs = array(
null => 'english',
'en' => 'english',
'fr' => 'french',
'nl' => 'dutch',
'de' => 'german',
'es' => 'spanish',
'gl' => 'galician',
'eu' => 'basque'
);
$lang_match = $chamilo_langs[get_preferred_language($available_langs)];
// recover previous value ...
if (isset($_SESSION['user_language_choice']))

@ -453,6 +453,10 @@ if (!empty($valid_languages)) {
}
}
// If language is set via browser ignore the priority
if (isset($_GET['language'])) {
$language_interface = $user_language;
}
}
// Sometimes the variable $language_interface is changed
@ -487,6 +491,7 @@ if (!empty($parent_path)) {
include $langpath.'english/trad4all.inc.php';
// prepare string for current language
$langfile = $langpath.$language_interface.'/trad4all.inc.php';
if (file_exists($langfile)) {
include $langfile;
}

Loading…
Cancel
Save