Questions tagged [django-multilingual]

38 questions
26
votes
9 answers

Django i18n: Common causes for translations not appearing

I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
15
votes
2 answers

makemessages for an app installed in virtualenv

I've installed a Django App to my virtualenv, and I would like to add extra translations to that App. Is it possible to import the messages from an app installed in a virtualenv to my django.po in my project's locale/pt/LC_MESSAGES…
André
  • 24,706
  • 43
  • 121
  • 178
8
votes
3 answers

What multinlingual database support for Django 1.3?

I am using Django for quite a while but each time I ask myself the same question again and again. Which multilingual database backend should I use ? I used django-multilingual on Django 1.1, django-multilingual-ng on Django 1.2 I add a look at…
Natim
  • 17,274
  • 23
  • 92
  • 150
8
votes
3 answers

django-multilingual and switching between languages on template side

I'm trying to use django-multilingual and setup it properly. But what I found is that everything is clear for django-multilingual except a template usage example. I just started to use django and I don't know, maybe because of this reason, I cannot…
israkir
  • 2,111
  • 7
  • 30
  • 39
5
votes
2 answers

Django urls aren't being translated

Following Translating URL patterns, I can make my urls being prefixed with the active language, but I can't get them translated. urls.py from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from…
marcanuy
  • 23,118
  • 9
  • 64
  • 113
4
votes
0 answers

Django translations with language code precedence / fallback

I'm looking for advice on how best to enhance Django's translation framework. The aim is to modify the translation system so that instead of immediately falling back to the msgid when a mapping cannot be found, the system first attempts to obtain a…
Dwight Gunning
  • 2,485
  • 25
  • 39
3
votes
2 answers

Organizing .po localization files for Django

The project I am working on has gotten pretty big. As have it's localization files. It has gotten hard to find your way around the translations. How do you manage big localization files in your django projects? I would like to separate the *.po…
David Schumann
  • 13,380
  • 9
  • 75
  • 96
3
votes
1 answer

how to translate an app template

I want to use multiple language in my app and for that i have followed this doc After the creation of django.po inside locale folder, I opened that, as this files contain '#' which told you that which line you can translate. But this file only…
user1746291
  • 323
  • 2
  • 5
  • 15
2
votes
1 answer

How can Django recognize language changes in a multilingual web page implemented in Django?

I have already implemented a web page in English using Django. I now have a question when I'm trying to create a web page in Chinese. Pages in Chinese will be separated by prefix(/ch/). I plan to implement a button to change the language, but the…
2
votes
1 answer

django multilinguage website @login_required redirect issue

I'm developing a multilingual website using django 1.11 , 'django.middleware.locale.LocaleMiddleware' middleware and i18n_patterns I use @login_required decorator for my views (for redirecting user to login page when he's not logged in) but it…
user1572461
  • 39
  • 1
  • 6
2
votes
3 answers

how to add change language dropdown to Django(1.10) admin?

I'm planning to add change language dropdown in my admin page. according to this code and How to extend admin page. I copy base_site.html and copy it to myapp/templates/admin, the i create a html file named change_language.html and write this code…
2
votes
3 answers

django-multilingual: order drop down field by translated field

how do i order a the options of a form field by a translated field? models.py: class UserProfile(models.Model): ... country=models.ForeignKey('Country') class Country(models.Model): class Translation(multilingual.Translation): …
tback
  • 11,138
  • 7
  • 47
  • 71
2
votes
1 answer

issues with url in multiple languages

I am using the concept of multiple languages in my project, and everything works fine. But i am having some queries about my url. When i am using this url www.asd.com/reg/?lang=es, then it display the data in spanish form. But if i am using this…
user1746291
  • 323
  • 2
  • 5
  • 15
2
votes
1 answer

Issues with translating the strings

I am using multiple translation in my project For that I have updated my settings file as LANGUAGE_CODE = 'en-us' gettext = lambda s: s LANGUAGES = ( ('es', gettext('Spanish')), ('en', gettext('English')), ) …
user1746291
  • 323
  • 2
  • 5
  • 15
2
votes
2 answers

Issues with multiple languages

I want my app will be available in multiple languages (let say two,one is default english and one more). And these both options available in my home page and there must be a link shown which makes user able to select his choice of language. I am…
Inforian
  • 1,716
  • 5
  • 21
  • 42
1
2 3