# General Translation Python SDKs: get_default_locale
URL: https://generaltranslation.com/en-US/docs/python/reference/functions/get-default-locale.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Read the configured source locale in General Translation Python. API reference for get_default_locale.

Returns the default (source) locale of the active [`I18nManager`](/docs/python/reference/classes/i18n-manager). This is the locale your content is written in and the fallback when no translation is found.

## Overview [#overview]

Call `get_default_locale` with no arguments to get the configured default locale code.

```python
from gt_flask import get_default_locale  # or: from gt_fastapi, or: from gt_i18n

default = get_default_locale()  # e.g. "en"
```

Signature:

```python
get_default_locale() -> 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 manager's `default_locale`, resolved from the `default_locale` argument, the `defaultLocale` config key, or the library default `"en"`.

## Parameters [#parameters]

`get_default_locale` takes no parameters.

## Returns [#returns]

**Type** `str`

The default locale code.

## Example [#example]

```python
from gt_flask import get_default_locale

default = get_default_locale()  # e.g. "en"
```

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
