Django internationalization

Hello guys it’s me again and for this question i scruwed so bad. I’ve started to do django’s internationalization and it doesn’t work i couldn’t find anything about my problem here is my codes:



TIME_ZONE = 'Europe/Istanbul'

USE_I18N = True

USE_L10N = True

USE_TZ = True

    os.path.join(BASE_DIR, 'locale')

from django.contrib import admin
from django.urls import path
from django.urls.conf import include
from product import views
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [

urlpatterns += i18n_patterns(
    path('', views.index, name="index"),
    path('about/', views.about,name="about-en"),
    prefix_default_language = False,

)+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

def about(request):
    abouts = Hakkimizda.objects.first()
    return render(request,"about.html",{"abouts":abouts})

(i just did this for see how it work but it didn’t work)

<h2> {% translate "denseme" %}</h2>


#: .\templates\about.html:5 .\templates\about.html:11
msgid "denseme"
msgstr "abc"

Did you run makemessages?

Whoops, I meant compilemessages. It looks like you’ve already run makemessages.

Thx for suggestion but i find my problem. It was on local_path and i change ‘{’ to ‘[’ problem is gone

1 Like