django-multilingual

Django i18n: Common causes for translations not appearing

孤者浪人 提交于 2019-12-18 12:49:28
问题 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 checked the source and these still appear as _('Whatever') like they should, also they are translated on the messages file, and yes, I remembered to do compilemessages . What are some common causes for translations not to appear like that? 回答1: Maybe the

Issues with translating the strings

自古美人都是妖i 提交于 2019-12-07 19:12:20
问题 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')), ) LOCALE_PATHS = ( '/mnt/aviesta/pythondev/django/locale', ) USE_I18N = True MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware

Issues with translating the strings

只愿长相守 提交于 2019-12-06 10:18:27
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')), ) LOCALE_PATHS = ( '/mnt/aviesta/pythondev/django/locale', ) USE_I18N = True MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale

What multinlingual database support for Django 1.3?

半腔热情 提交于 2019-12-04 11:00:41
问题 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 django-nani for Django 1.3 but there quite few problems : No ModelAdmin API support : I cannot modify the TranslatedFields on the save() method since the object is created by a post_signal after. I which some people overthere could help me find a way to

What multinlingual database support for Django 1.3?

◇◆丶佛笑我妖孽 提交于 2019-12-03 07:01:12
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 django-nani for Django 1.3 but there quite few problems : No ModelAdmin API support : I cannot modify the TranslatedFields on the save() method since the object is created by a post_signal after. I which some people overthere could help me find a way to handle multilingual websites. I like the way multilingual, multilingual-ng and nani handle languages

how to translate an app template [closed]

a 夏天 提交于 2019-12-01 23:46:29
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . 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

how to translate an app template [closed]

会有一股神秘感。 提交于 2019-12-01 22:32:30
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 contain admin part it does not have my app templates i.e., HTML files of my app. So how I can translate those HTML files, OR what should I have to do so that django.po file can also contain my app templates. I have followed only this doc . You need to use the {% trans %} or {% blocktrans %} template tags in your html files before you run python manage.py

Issues with multiple languages

六眼飞鱼酱① 提交于 2019-12-01 09:39:26
问题 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 reading the Django official documentation for this so any one can let me know the general idea how I can do that. and one more thing......in settings.py there is default LANGUAGE_CODE = 'en-us' given,BUT as I want my app in more then one language so

Django i18n: Common causes for translations not appearing

孤街醉人 提交于 2019-11-30 08:13:00
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 checked the source and these still appear as _('Whatever') like they should, also they are translated on the messages file, and yes, I remembered to do compilemessages . What are some common causes for translations not to appear like that? Maybe the translated strings are marked as fuzzy ? Just got hit by one. I had the locale/ directory in the root of my

makemessages for an app installed in virtualenv

女生的网名这么多〃 提交于 2019-11-29 12:55:51
问题 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 folder? Alternatively, should I translate the 3rd party app? If so, how can I use makemessages to generate the messages in the app installed in the virtualenv? 回答1: Within my project directory I make a (temporary) symlink to the app in my virtualenv and then I run