locale/en/LC_MESSAGES: | |
-rw-rw-r-- 1 joey joey 67 May 20 10:38 template.mo | |
-rw-rw-r-- 1 joey joey 28 May 20 10:37 template.po | |
template.po: | |
msgid "foo" | |
msgstr "foobar" | |
locale/it/LC_MESSAGES: | |
total 8 | |
-rw-rw-r-- 1 joey joey 67 May 20 10:38 template.mo | |
-rw-rw-r-- 1 joey joey 28 May 20 10:37 template.po | |
template.po: | |
msgid "foo" | |
msgstr "barbat" | |
myscript.php: | |
<?php | |
setlocale(LC_ALL, 'en_GB.UTF-8'); | |
bindtextdomain ("template", "./locale"); | |
textdomain ("template"); | |
echo _("foo"), "\n"; | |
setlocale(LC_ALL, 'it_IT.UTF-8'); | |
echo _("foo"), "\n"; | |
php -f myscript.php: | |
foobar | |
barbat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
strace -o /dev/stdout -e open -fF php -f myscript.php | grep locale