Django Multi Language

Rosetta paketi yüklenecek. pip install django-rosetta urls.py : if ‘rosetta’ in settings.INSTALLED_APPS: urlpatterns += [ url(r’^rosetta/’, include(‘rosetta.urls’)) ] settings.py : MIDDLEWARE = [ … ‘django.middleware.locale.LocaleMiddleware’, … ] from django.utils.translation import gettext_lazy as _ LANGUAGE_CODE = ‘tr’LANGUAGES = ( (‘en’, _(‘English’)), (‘tr’, _(‘Turkish’)), (‘es’, _(‘Spanish’)),) LOCALE_PATHS = ( os.path.join(BASE_DIR, ‘locale/’), ) TIME_ZONE = ‘Europe/Istanbul’ USE_I18N = […]