简体   繁体   中英

How to go about internationalization?

I'm building a web application that will be in a single language (Dutch) at launch. However, at some point it might be translated to other languages as well, which is why I want to have internationalization build in from the start.

The problem is that currently there are 3 separate places that display strings, namely the templates, the python backend and some javascript. Since I've never internationalized an application of any kind I was wondering if there is some way of avoiding this spread? And also, what is the best way to go about internationalization?

Edit: As a bit of clarification, I'm using the following parts: Jinja2, Flask, WTForms jQuery, and on top of that a bunch of Python and Javascript code.

As far as I know, gettext is the most widely used tool for i18n. However, every language and framework implements it's own wrappers around this:

All of them should use the same translation files, so they should be able work together without any duplication in the translations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM