| @@ 144-148 (lines=5) @@ | ||
| 141 | ||
| 142 | // http://code.spip.net/@lang_typo |
|
| 143 | function lang_typo($lang = '') { |
|
| 144 | if (!$lang) { |
|
| 145 | $lang = isset($GLOBALS['lang_objet']) |
|
| 146 | ? $GLOBALS['lang_objet'] |
|
| 147 | : $GLOBALS['spip_lang']; |
|
| 148 | } |
|
| 149 | if ($lang == 'eo' |
|
| 150 | or $lang == 'fr' |
|
| 151 | or strncmp($lang, 'fr_', 3) == 0 |
|
| @@ 731-739 (lines=9) @@ | ||
| 728 | ||
| 729 | // On peut passer explicitement la langue dans le tableau |
|
| 730 | // On utilise le même nom de variable que la globale |
|
| 731 | if (isset($args['spip_lang'])) { |
|
| 732 | $lang = $args['spip_lang']; |
|
| 733 | // On l'enleve pour ne pas le passer au remplacement |
|
| 734 | unset($args['spip_lang']); |
|
| 735 | } // Sinon on prend la langue du contexte |
|
| 736 | else { |
|
| 737 | $lang = $GLOBALS['spip_lang']; |
|
| 738 | } |
|
| 739 | $text = $traduire($texte, $lang); |
|
| 740 | ||
| 741 | if (!strlen($text)) { |
|
| 742 | if (!$o['force']) { |
|