I am new to Flask and Babel and I have just started a project which will contain several languages. After I have generated the babel.cfg file, when I attempt to extract it with the command pybabel extract -F babel.cfg -o messages.pot ., I get the AttributeError: module ‘jinja2.ext’ has no attribute ‘autoescape’ error. What can be the reason for this
Tag: python-babel
Internationalization (i18n) not rendered using flask-babel and apache with mod_wsgi on Ubuntu instance
I have a web application developed using python 2.7.6, flask and deployed on a Apache Ubuntu server. For internationalization, the app uses the flask-babel package in order to translate into Thai. …
How does Python babel round numbers?
I’m building a financial website with the Flask framework and I’m currently writing unit tests for it. I’m using the Babel package to format money amounts and I hit upon rather strange rounding …
Flask-Babel do not translate anything in a web project
Description of my usage: This is my project structure(basically base on Flask Web Development): ├── README.md ├── app │ ├── __init__.py │ ├── admin │ │ ├── __init__.py │ │ ├── user_admin….
Python Unit test with i18 but without webapp2
I encountered a problem with unit tests when use i18 in my project. My project uses framewoks i18 and webapp2 The function uses the translation by i18. But when I test, I get the error – missing …
How to enable timezones with babel in my jinja filter?
I want to use timezones according to the babel locale. How can I achieve this? The specific situation I have is the goal of displaying the date and time of an article and a humanized and localized way …
How to sort collections based on current user locale on a Django site
I need to sort a collection of objects by a utf-8 string property (built via ActiveRecord). Currently the code is sorting by ASCII order via the order_by method, however this needs to be changed to …