版本:
我跟着the rosetta tutorial。使用{% trans "sentence" %}
(和{% load i18n %}
)创建一些要在模板中翻译的句子,然后运行django-admin
的{{1}}和makemessages
后,rosetta仍无法找到任何内容翻译:
无需翻译!
您尚未在设置文件中指定任何语言,或者没有 但却产生了一批翻译目录。
请参阅Django的I18N文档,获取有关如何设置的指南 为您的项目实现国际化。
注意:
compilemessages
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-13 13:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/www/batch.html:8
msgid "(mother) and"
msgstr ""
#: templates/www/batch.html:8
msgid "(father)"
msgstr ""
的{{1}}列表中。没有效果,除了我必须解决yet another bug。settings.py
。LANGUAGES
(通过PyCharm)运行服务器。地方发展。我无法想到或发现任何其他事情要尝试。