1

i want to translate my webpage. but using i18n module in django, it looks like it is impossible.

on django internationlization tutorial they say to edit all po files.

the po files

# 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: 2013-05-27 10:16+0530\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"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"

#: registration/admin.py:23
msgid "Activate users"
msgstr ""

#: registration/admin.py:43
msgid "Re-send activation emails"
msgstr ""

#: registration/forms.py:34
msgid "Username"
msgstr "uuuuuuuuuuuu"

edit to languages which i don't know is very very hard. so i would like to know any apps that will automatically translate..?

4

1 回答 1

2

好吧,我不知道有任何“自动翻译”的 Django 应用程序。不过,这将是一个有趣的...

我知道一个名为 - django-mothertongue的漂亮 Django 应用程序。这个应用程序可以很容易地检测和添加对新语言的支持。这对于处理以不同语言显示的静态文本应该是完美的。例如,您有一些静态文本 X 以及用 20 种不同语言显示的内容。使用谷歌翻译手动将 X 翻译成这 20 种语言并存储。

但问题在于它不进行自动翻译。

自动语言翻译是一项涉及深度语言理解和 NLP 技术的复杂功能,对于 django 应用程序来说是不切实际的。我建议您在Google Translate Developers API的帮助下将其插入django-mothertongue或直接插入django-i18. 因此,使用谷歌翻译,理论上你可以进行即时语言检测,并将语言从一种语言翻译成另一种语言。如果您采用这种方法,请注意 Google 翻译仍然是倾斜模型,而且我已经看到它在多个案例中大失所望。

于 2013-05-27T05:51:55.920 回答