internationalization - PHP: does gettext require LC_MESSAGES dirs? -
to translate php app use compiled in gettext module. here directory tree of translations made according docs:
locale/ cs_cz/ lc_messages/ messages.po messages.mo de_de/ lc_messages/ messages.po messages.mo fr_fr/ lc_messages/ messages.po messages.mo
question: possible rid of lc_messages catalog? php able find translations if use structure?
locale/ cs_cz/ messages.po messages.mo de_de/ messages.po messages.mo fr_fr/ messages.po messages.mo
my php switches translations:
<?php setlocale(lc_all, 'fr_fr.utf-8'); bindtextdomain("messages", "locale"); bind_textdomain_codeset("messages", 'utf-8'); textdomain("messages"); ?>
thank in advance.
the feasible workaround creating symlink lc_messages -> .
in each language subdirectory. (but complicates php application installation. ftp seldomly can create symlinks.)
Comments
Post a Comment