I'm using gettext translation adapter in a Zend Framework projekt. But I'm wondering what's the best practise when naming and placing these translation files within my project?
At first I had APPLICATION_PATH/languages/sv_SE.po (and sv_SE.mo)
But then I read about the auto searching features of Zend Framework and started wondering if it would be better to have the languages in subfolders. But the structure APPLICATION_PATH/languages/sv_SE/sv_SE.po and APPLICATION_PATH/languages/en_US/en_US.po
didn't feel quite natural. Using array adapters ect it have felt easier to come up with a good naming conventions... But what is the best practise when it comes to using gettext translations in Zend Framework? Is it most common to have all translations in a single file or should one use something like
APPLICATION_PATH/languages/en_US/admin.po
APPLICATION_PATH/languages/en_US/forms.po
APPLICATION_PATH/languages/en_US/othercrap.po
Feels like this apporach might make it tedious when scanin开发者_Go百科g source for strings to translate since one would have to open several files etc.
I ended up using
APPLICATION_PATH/languages/en_US/admin.po
APPLICATION_PATH/languages/en_US/forms.po
APPLICATION_PATH/languages/en_US/othercrap.po
which has worked fine.
精彩评论