33 Django E Commerce Multi Language on static html files and Urls Part1 English

preview_player
Показать описание
Multi Language (Internationalization and localization) on Django Static files (templates- html) and Urls (path)
SETTING *************
MIDDLEWARE

LANGUAGES = [
('en', _('English')),
('tr', _('Turkish')),
]

#LANGUAGE_CODE = 'en-us'

LOCALE_PATHS = (
)

Installation
pip install python-gettext
Errors
CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

templates
{% load i18n %}
{% trans "Your Text" %}

COMMANDS:********
django-admin makemessages -l tr -a
django-admin compilemessages

Url
Change urlpattern with i18n
Рекомендации по теме
Комментарии
Автор

How do you keep the changed language when navigating to a new page? I can initially change the language which works but when I go to a different page, the default language is what is displayed. To see the translation I have to manually type in the language code in my url

sheriffcrandy
Автор

Please make unit, function and integration tests for this E-commerce ...

mu
Автор

Hocam Harika Bir Video, ama url trasnlati yaptıktan sonra , navbarda butona basıca eski translate olmasan url gitmek istiyor orasını aşamadım hocam yaparım acaba ?

rezervium
Автор

Thank you Sir for the great content. I was wondering, what additional steps should I take, in terms of template layout, should I take to support RTL languages (Arabic for example)?

khwarzme
Автор

Hocam nasıl kullanıcının dil seçimini hatırlayabiliriz ? Tarayıcı Türkçe ise ve ingilizceyi seçse bile bir süre sonra Türk.e default oluyor.

caglargulucan
Автор

I need the code to dynamically get canonical meta link, alternate link href for multilingual

dhrubkumarsharma
Автор

How many more videos can we expect ? By when are you planning to finish up the project ?

Sufi
Автор

Thx For video Hocam, But We have all so problem model translation ım used on my project but ı cant change my models ...

rezervium
visit shbcf.ru