Hi Martin, I know of a few approaches, depending on the complexity of your tool:
- You can get pretty far with having your strings in, say, JSON files that you load and format yourself in code based on placeholders. - The Python standard library has a built-in gettext <https://docs.python.org/2.7/library/gettext.html> module if you prefer a more standard format. - For a more comprehensive solution that adds date formatting, I heard good things about Flask-Babel <https://pythonhosted.org/Flask-Babel/>, but never used it myself. Whichever way you choose, I'd definitely recommend managing the translations through TranslateWiki <https://translatewiki.net/>, which you might already know about. Em ter, 18 de set de 2018 às 15:14, Martin Urbanec < martin.urba...@wikimedia.cz> escreveu: > Hi, > > I'm sometimes use Flask for my Toolforge tools. I'd like to localize them, > ideally with messages directory in similar format like MediaWiki has in > i18n directory. > > I know about Intuition for PHP, does anybody know about similar thing for > Flask application? > > Best, > Martin > _______________________________________________ > Wikimedia Cloud Services mailing list > Cloud@lists.wikimedia.org (formerly lab...@lists.wikimedia.org) > https://lists.wikimedia.org/mailman/listinfo/cloud -- Guilherme P. Gonçalves
_______________________________________________ Wikimedia Cloud Services mailing list Cloud@lists.wikimedia.org (formerly lab...@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/cloud