Ignore:
Timestamp:
Jan 19, 2012, 6:38:53 PM (12 years ago)
Author:
mistic100
Message:

compliant with Piwigo Translate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PHP_Optimisateur/include/functions.php

    r12819 r12926  
    33// Affiche les textes localisés
    44function l10n($code) {
    5   global $Lang;
    6   if (isset($Lang[$code])) {
     5  global $lang;
     6  if (isset($lang[$code])) {
    77    $args = func_get_args();
    88    if (count($args) > 1) {
    99      array_shift($args);
    10       return vsprintf($Lang[$code], $args);
    11     } else {
    12       return $Lang[$code];
     10      return vsprintf($lang[$code], $args);
     11    } else {
     12      return $lang[$code];
    1313    }
    1414  } else {
     
    182182// Booléen vers français ou texte
    183183function bool_to_string($string, $just_echo=0) {
    184   global $Lang;
     184  global $lang;
    185185  # $just_echo pour pouvoir afficher un booléen tel quel (echo true; n'affiche rien)
    186186  if (is_bool($string)) {
     
    259259// Charge le fichier de langue d'un plugin
    260260function load_plugin_lang($plugin_id) {
    261   global $CONF, $Lang;
     261  global $CONF, $lang;
    262262  if (file_exists('plugins/'.$plugin_id.'/language/'.$CONF['user_lang'].'.php')) {
    263263    include('plugins/'.$plugin_id.'/language/'.$CONF['user_lang'].'.php');
Note: See TracChangeset for help on using the changeset viewer.