V
V
Vladislav Sklyar2015-07-20 11:30:00
Django
Vladislav Sklyar, 2015-07-20 11:30:00

Project internationalization?

Good afternoon Toaster!!!
I have a problem with the internationalization of the project.
What I've done:

  1. Created a folder locale
  2. Added the following lines to settings.py
    USE_I18N = True
    LANGUAGES = (
        ('en', 'English'),
        ('uk', 'Ukrainian'),
    )
    LANGUAGE_CODE = 'en'
    
    LOCALE_PATHS = (
        os.path.join(BASE_DIR, 'locale'),
    )

  3. In the template, I marked the lines that need to be translated.
    Added {%load i18n%}
  4. In the terminal I wrote django-admin makemessages -l uk
  5. Went to locale folder, changed django.po --> django-admin compilemessages
  6. Changed url.py, replaced patterns with i18n_patterns

I am running a local server. My translation is not working. Please help with advice or links.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Sklyar, 2015-07-20
@VladSkliar

Unfortunately, everything is ok. simply. I specified the wrong path to the locale folder. More precisely, the path is correct, but the django folder was not created there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question