问题
Symfony 2 as version 2.1 supports gettext (MO and PO files).
I have following configuration (app/config/config.yml
):
framework:
translator: { fallback: "en" }
default_locale: "fa_ir"
...
How can I configure to support for mo files?
回答1:
I found without any configuration I can put messages.fa_ir.mo
in Resources/translations
directory of bundle and Symfony2 itself will find it...
来源:https://stackoverflow.com/questions/13218175/configure-translation-component-in-symfony-2-to-use-gettext