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

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

问题描述

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



有人成功地将Python Google App Engine gettext 文件?如果是这样,您能否提供您使用的步骤?



我已经开始 GAE的Google小组讨论,但还没有能够从中提取出我想要做的事情:我不想添加外部依赖关系,如Babel(在讨论中建议)。我想使用普通的谷歌应用程序引擎,所以没有手动更新Django或这种东西。



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



作为背景说明为了向您提供有关我正在尝试执行的操作的更多详情,我希望将我在Launchpad上托管的开源应用程序问题跟踪器跟踪器国际化。我打算使用Launchpad的翻译平台(解释为什么我想使用.mo文件)。你可以看看它的Bazaar分支的源代码(对不起,没有链接,因为新用户的stackoverflow垃圾邮件预防限制...)

感谢您帮助我提前您可以使用Django国际化工具,就像解释 archive.org/web/20150308191617/http://blog.yjl.im/2009/02/using-django-i18n-in-google-app-engine.htmlrel =nofollow noreferrer>此处

他们也在说没有简单的方法来做到这一点。



我希望能帮到你:)

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).

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

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.

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.

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!

解决方案

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

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

I hope that helps you :)

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

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