0
J'essaie de créer un nouveau site Web multilingue. J'utilise poEDit
et getText()
fonction. Je ne sais pas ce que j'ai manqué avec ce code:site en plusieurs langues poEDit et getText()
<?php
if (!function_exists("gettext"))
{
echo "gettext is not installed\n";
} else {
echo "gettext is supported\n";
}
$language = 'ar_JO';
putenv("LANG=$language");
setlocale(LC_ALL, $language);
$domain = 'ar_JO';
bindtextdomain($domain, "./locale");
bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
echo _("HELLO_WORLD");
echo _("hi this to be translated ");
J'ai ce "C: \ wamp \ www \ loginSystemOOP/locale/ar_JO/LC_MESSAGES/messages_ar_JO.mo" et ma structure de fichiers est 'C: \ wamp \ www \ loginSystemOOP/locale/ar_JO/LC_MESSAGES /' –