Closed ogurec-ogurec closed 4 years ago
You have to use the compilemessages
command of Django. Read the Internationalization page of the docs: here. Remember that the JavaScript plugin uses its own djangojs.po
as oppose to the django.po
used by the backend.
There's already a django.po
for Russian in django-comments-xtd. It was added by @MikerStudio a month ago. However there's no translation for the plugin yet.
On changing the language, if you want your site to be in Russian, change the LANGUAGE_CODE
setting in your settings.py
module:
LANGUAGE_CODE = 'ru'
If you want to support multiple languages, I recommend you to read the pages under the Internationalization topic in the office Django site, it's a lot, but it's worth reading. You can also see how it is done in the example comp site that comes with django-comments-xtd:
settings.py
module:
LANGUAGES
setting and LANGUAGE_CODE
(as you do already, but add more languages).USE_I18N = True
urls.py
module:
re_path(r'^i18n/', include('django.conf.urls.i18n'))
LANGUAGE
in base.html in the comp project.thanks
How can I change the language? For example, in Russian. In the settings added:
Added 1 a file django.po (rus) to the folder:
..\Lib\site-packages\django_comments_xtd\locale\ru\LC_MESSAGES\django.po
Restarted the server, but nothing has changed.