[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / configuration / langue.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 //
16 // Configuration i18n
17 //
18
19 include_spip('inc/presentation');
20
21 function configuration_langue_dist()
22 {
23 $l_site = $GLOBALS['meta']['langue_site'];
24 $langue_site = traduire_nom_langue($l_site);
25
26 $res = "<option value='$l_site' selected='selected'>$langue_site</option>\n";
27
28 foreach (explode(",",$GLOBALS['meta']['langues_proposees']) as $l) {
29 if ($l <> $l_site)
30 $res .= "<option value='$l'>".traduire_nom_langue($l)."</option>\n";
31 }
32
33 $res = ajax_action_post('configurer',
34 'langue',
35 'config_lang', '',
36 "<label for='changer_langue_site'>" .
37 _T('info_langue_principale') .
38 "</label>" .
39 " : <select name='changer_langue_site' id='changer_langue_site'>\n$res</select>\n",
40 '');
41
42 $res = debut_cadre_couleur("langues-24.gif", true, "", _T('info_langue_principale') . "&nbsp;:&nbsp;" . $langue_site) .
43 _T('texte_selection_langue_principale') .
44 $res .
45 fin_cadre_couleur(true);
46
47 return ajax_action_greffe("configurer-langue", '', $res);
48 }
49 ?>