# General Translation Python SDKs: get_locales URL: https://generaltranslation.com/en-GB/docs/python/reference/functions/get-locales.mdx --- title: get_locales description: List the supported locales configured in General Translation Python. API reference for get_locales. --- Returns the list of locales supported by the active [`I18nManager`](/docs/python/reference/classes/i18n-manager), always including the default locale. ## Overview [#overview] Call `get_locales` with no arguments to get the supported locale codes. ```python from gt_flask import get_locales # or: from gt_fastapi import get_locales, or: from gt_i18n import get_locales locales = get_locales() # e.g. ["en", "es", "fr"] ``` Signature: ```python get_locales() -> list[str] ``` *Note: It reads the active manager, so [`initialize_gt`](/docs/python/reference/functions/initialize-gt) (or [`set_i18n_manager`](/docs/python/reference/functions/set-i18n-manager)) must run first; otherwise, it raises `RuntimeError`.* ## How it works [#how-it-works] * **Reads configuration.** It returns the `locales` resolved from configuration, always including the default locale. * **Order.** The list is built from a set, so its order is not guaranteed. ## Parameters [#parameters] `get_locales` takes no parameters. ## Returns [#returns] **Type** `list[str]` The supported locale codes. ## Example [#example] ```python from gt_flask import get_locales locales = get_locales() # e.g. ["en", "es", "fr"] ```