The question is published on by Tutorial Guruji team.
I am developing a app which using flask and some extensions like flask-peewee, flask-wtf, etc.. The problem is, I want to translate strings in these extensions into Chinese, how to modify these extensions to support i18n?
I know flask-babel can make app support i18n, but it didn’t support i18n of other modules, especially extensions of flask.
And I don’t want to directly change strings in these modules, because it’s a dirty way.
Can any body help me?
Flask-wtf form already support i18n, it supported by default next locales https://github.com/wtforms/wtforms/tree/master/wtforms/locale, and you always can add missing.
I don’t find any information about
peewee i18n support, but I also don’t found any language specific messages there.
wftpeewee I found only support
gettext usage in code without translation files, so you can just try translate this few strings in main application or update
wtforms translation files.
flask-peewee I don’t find any support in code and templates, so look like you will fix this yourself.