# python: Flask Quickstart URL: https://generaltranslation.com/en-US/docs/python/tutorials/flask-quickstart.mdx --- title: Flask Quickstart description: Add internationalization to your Flask app with gt-flask --- **Experimental:** `gt-flask` is experimental and may be subject to breaking changes. ## Install ```bash pip install gt-flask ``` ## Create a config file Create a `gt.config.json` in your project root: ```json title="gt.config.json" { "projectId": "your-project-id", "defaultLocale": "en", "locales": ["es", "fr"] } ``` ## Initialize `initialize_gt` automatically reads `gt.config.json` from the current working directory. If your config file is located elsewhere, pass the path with `config_path`: ```python title="app.py" from flask import Flask from gt_flask import initialize_gt, t app = Flask(__name__) initialize_gt(app) # or: initialize_gt(app, config_path="path/to/gt.config.json") ``` ## Translate strings Use the `t` function in your routes: ```python title="app.py" @app.get("/") def index(): return {"message": t("Hello, world!")} ``` ## Next steps - See [`t`](/docs/python/api/t) for variable interpolation and options. - See [`initialize_gt`](/docs/python/api/initialize-gt) for all configuration options.