Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django do not create locale po file for my project

Looks like django do not want create/update .po file for my project (or django do not know that i'm using any other languages).

# mkdir locale
# python manage.py makemessages --all
# ls locale/
# (empty dir)

however:

# mkdir locale
# python manage.py makemessages -l ru-ru
# ls locale/
# ru-ru  (will create ru-ru directory)

but if a do modification in this file, then do compilemessages -l ru-ru - django will not use apply it, and seems like this modification does not react on anything.

Here is my settings.py:

TIME_ZONE = "Europe/Moscow"
LANGUAGE_CODE = 'ru-ru'

SITE_ID = 1
USE_I18N = True
USE_L10N = True

MIDDLEWARE_CLASSES = (
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.locale.LocaleMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
   'cms.middleware.user.CurrentUserMiddleware',
   'cms.middleware.page.CurrentPageMiddleware',
   'cms.middleware.toolbar.ToolbarMiddleware',
   "account.middleware.TimezoneMiddleware",
)

TEMPLATE_CONTEXT_PROCESSORS = (
  'django.contrib.auth.context_processors.auth',
  'django.core.context_processors.i18n',
  'django.core.context_processors.debug',
  'django.core.context_processors.request',
  'django.core.context_processors.media',
  'django.core.context_processors.csrf',
  'django.core.context_processors.tz',
)

What i'm doing wrong ?

Thank you

like image 514
Vlad Avatar asked Jul 07 '14 12:07

Vlad


1 Answers

I suspect you need to set LOCALE_PATHS too

like image 51
Steve Jalim Avatar answered Oct 02 '22 07:10

Steve Jalim