私のsettings.pyファイルにこのコードを入れてください:
LANGUAGES = (
('ru', 'Russian'),
)
DEFAULT_LANGUAGE = 0
LANGUAGE_CODE = 'ru-RU'
しかし、エラー:
raise forms.ValidationError(_("Please enter a correct username and password. Note that both fields are case-sensitive."))
英語でメッセージを返しますが、そのdjangoにはdjango /usr/local/lib/python-2.7/dist-packages/django/contrib/locale/ru/LC_MESSAGES/django.poで翻訳があります
なんで ?
ミドルウェアは次のとおりです。
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
# 'cms.middleware.multilingual.MultilingualURLMiddleware',
# 'django.middleware.transaction.TransactionMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'pagination.middleware.PaginationMiddleware',
'banner_middleware.Banner',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.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.static',
'cms.context_processors.media',
'sekizai.context_processors.sekizai',
)