Django internationalization files in apps folders
Is it possible to create separate *.mo and *.po files for every application? Lets say that I add new external app to my project and I don
t want to localize it but use some translations开发者_运维技巧 which, are contained in it.
In short - yes, it's possible and recommended (it helps keeping order in the translations). Simply:
- Execute
manage.py makemessages
in the root directory of your Django app to create.po/.mo
files for that particular app. - Store the translation files will be in stored in
$APPPATH/locale/<language>/LC_MESSAGES/django.(po|mo)
directory (so inside the app directory).
精彩评论