0

I want Azerbaijan to show up in the browser as as Azerbaïdjan (French spelling).

1) I placed the django_countries dir (downloaded from https://pypi.python.org/pypi/django-countries) in my project root.

2) added "django_countries" to my INSTALLED_APPS

3) added "from django.utils.translation import ugettext_lazy as _ " in my app1/forms.py

4) changed the following (in the forms.ModelForm subclass):

def clean_name(self): return self.cleaned_data['name'] to:

def clean_name(self): return _(self.cleaned_data['name'])

5) changed the language preference in Chrome to French

What am I missing? Thanks

1 Answers1

0

Not easy to understand your problem, but I guess you missing this: https://docs.djangoproject.com/en/1.11/topics/i18n/translation/#localization-how-to-create-language-files

Karim N Gorjux
  • 2,880
  • 22
  • 29