如何创建国际化的 Google App Engine 应用程序 [英] How to create an internationalized Google App Engine application

查看:30
本文介绍了如何创建国际化的 Google App Engine 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以用户自己的语言提供我的 Python GAE 网站,仅使用 App Engine 中直接提供的工具.为此,我想使用 GNU gettext 文件(.po 和 .mo 文件).

I would like to provide my Python GAE website in the user's own language, using only the tools available directly in App Engine. For that, I would like to use GNU gettext files (.po and .mo files).

有人成功地合并了 Python Google App Enginegettext 文件吗?如果是这样,请提供您使用的步骤吗?

Has someone successfully combined Python Google App Engine and gettext files? If so, could you please provide the steps you used?

我在 GAE 的 Google 群组中开始了讨论,但无法从中提取出我想要的方式:我不想添加外部依赖项,例如 Babel(在讨论中建议).我想使用普通的 Google App Engine,所以不需要手动更新 Django 或此类东西.

I had started a discussion in GAE's Google group, but haven't been able to extract from it how I'd like to do it: I don't want to add external dependencies, like Babel (suggested in the discussion). I want to use plain vanilla Google App Engine, so no manual update of Django or this kind of stuff.

一开始,我会开始使用浏览器发送的语言,所以不需要通过cookies等手动强制语言.但是,一旦基本国际化工作,我可能会在以后添加语言更改功能.

At first, I will start using the language sent by the browser, so no need to manually force the language by using cookies etc. However, I might add a language changing feature later, once the basic internationalization works.

作为背景说明,向您提供有关我正在尝试执行的操作的更多详细信息,我想将 Issue Tracker Tracker 国际化,这是我在 Launchpad 上托管的一个开源应用程序.我打算使用 Launchpad 的翻译平台(解释为什么我想使用 .mo 文件).你可以看看它的 Bazaar 分支中的源代码(抱歉没有链接,因为新用户的 stackoverflow 垃圾邮件预防限制......)

As a background note to give you more details about what I'm trying to do, I would like to internationalize Issue Tracker Tracker, an open source application I've hosted on Launchpad. I plan to use Launchpad's translation platform (explaining why I'd like to use .mo files). You can have a look at the source code in it's Bazaar branch (sorry no link due to stackoverflow spam prevention limit for new users...)

感谢您帮助我推进这个项目!

Thanks for helping me advance on this project!

推荐答案

您可以使用 Django 国际化工具,如此处.

You can use the Django internationalisation tool, like explained here.

他们还说没有简单的方法可以做到这一点.

They are also saying that there is no easy way to do this.

希望对你有帮助:)

这篇关于如何创建国际化的 Google App Engine 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆