Gettext : Différence entre versions
De OviWiki
| Ligne 1 : | Ligne 1 : | ||
| + | == liens utiles == | ||
| + | * [http://fr.php.net/gettext gettext] | ||
| + | * [http://www.poedit.org/ poedit] | ||
| Ligne 15 : | Ligne 18 : | ||
</pre> | </pre> | ||
| + | |||
| + | |||
| + | == Traduction avec POedit == | ||
| + | |||
| + | il faut redémarrer apache après modification du fichier MO | ||
Version du 9 janvier 2007 à 10:53
liens utiles
Fonction de traduction
bab_locale();
bindtextdomain($GLOBALS['babAddonFolder'], './'.$GLOBALS['babInstallPath'].'lang/addons/'.$GLOBALS['babAddonFolder']);
bind_textdomain_codeset($GLOBALS['babAddonFolder'], 'UTF-8');
function nwd_translate($str) {
return utf8_decode(dgettext($GLOBALS['babAddonFolder'],$str));
}
Traduction avec POedit
il faut redémarrer apache après modification du fichier MO