The server must be restarted after editing. Thanks all for your help
PO, MO translation files
-
10-03-2022 - |
Frage
I want make a multi-language app I heard about .po
files but I can't locate it I made this code
I made a directory in my application called languages
and I put the ar_EG.po
file in it
and I tried languages\ar\LC_MESSAGES
but it dosen't work too
putenv('LC_ALL=ar_EG');
setlocale(LC_ALL, 'ar_EG', 'ara_EGY');
$domain = 'ar_EG';
bindtextdomain($domain, "./languages"); // I think the error here
textdomain($domain);
// to verify that localization is enabled and it works as intended:
echo strftime("%A %B %Y", strtotime("01/30/2013")), "<br>";
echo gettext("login"); // here not working
Lösung
Andere Tipps
You need to compile your po file into a mo file, and put that in there instead...
Also, you need to make sure that GetText is installed...
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow