First time here? Check out the FAQ!
1

What is the right location for my django translation files?
 

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
asked 11 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.

Comments

see more comments

1 Answer

1

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Fitoria's avatar
1.1k
Fitoria
answered 11 years ago, updated 11 years ago
link

Comments

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

nimbiotics's avatar nimbiotics (11 years ago)
see more comments