GÜNGÖR BUDAK

Bioinformatics Analyst at Seven Bridges & PhD Student at METU

Django Rosetta Translations for Django Applications

Make a directory called locale/ under the application directory:

cd app_name
mkdir locale

Add the folder in LOCAL_PATHS dictionary in settings.py:

LOCALE_PATHS = (
    os.path.join(PROJECT_ROOT, 'app_name', 'locale/'),
)

Run the following command to create PO translation file for the application:

python ../manage.py makemessages -l tr -e html,py,txt
python ../manage.py compilemessages

Option -l is for language, it should match your definition in settings.py:

LANGUAGES = (
    ('en' _('English')),
    ('tr' _('Turkish')),
    ('it' _('Italian')),
)

Repeat the last step for all languages and the go to Rosetta URL to translate.