By default, English is the language for applications built in Flask (and almost all web frameworks). In this recipe, we will add a second language to our application and add some translations for the display strings used in the application. The language displayed to the user will vary depending on the language that is currently set in the browser.
Adding a new language
Getting ready
We will start with the installation of the Flask-Babel extension:
$ pip3 install Flask-Babel
This extension uses Babel, pytz, and speaklater to add i18n and l10n support to the application.
We will use our catalog application from Chapter 5, Webforms with WTForms.