# python: get_locales URL: https://generaltranslation.com/en-US/docs/python/api/get-locales.mdx --- title: get_locales description: API reference for the get_locales function --- ## Overview Returns the list of supported locales configured via [`initialize_gt`](/docs/python/api/initialize-gt) or `gt.config.json`. ```python from gt_flask import get_locales # or from gt_fastapi import get_locales locales = get_locales() # e.g., ["en", "es", "fr"] ``` ## Reference ### Returns `list[str]` — the list of supported locale codes.