Ask Your Question
1

What is the right location for my django translation files?

asked 2013-10-04 00:27:34 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

Hi,

I'm giving my first steps with python/django/mezzanine so please bear with me.

I modified a translation file and compiled it ok.

The translated file belongs to mezzanine's blog application and the only place I found out I could place it to test was at the blog app's locale folder (~/MY_VIRTUAL_ENV/lib/python2.7/site-packages/mezzanine/blog/locale/es/LC_MESSAGES).

It worked fine, but my guts tell me there has to be a way I can have this file(s) in some other location WITHIN my own mezzanine application so:

  1. I can easily maintain it and
  2. I don't have to keep my whole virtual environment in my SCM's repository.

Am I in the right track? If so, where should I place my new own translation files?

Thanks a lot in advanced

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-07 10:07:40 -0500

updated 2013-10-07 16:06:42 -0500

in that case you can add a locale directory in your project and add it to LOCALE_PATHS in your settings.py that way every app [that you use will be translated directly in your project code info here

You wont have to translate everything if it already exits on the app locale it will be showed on the generated PO so you'll have a starting point.

edit flag offensive delete link more

Comments

This solution worked like a charm. Thanks a BUNCH! I cant upvote ... my account is too recent...

nimbiotics gravatar imagenimbiotics ( 2013-10-07 16:10:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-10-04 00:27:34 -0500

Seen: 186 times

Last updated: Oct 07 '13