# babel

URL: /kida/api/babel/
Section: api
Description: Babel extraction plugin for Kida templates.

Usage in ``babel.cfg``::

    [kida: templates/**.html]
    encoding = utf-8

Requires the ``babel`` package to be installed. Registration is via
the ``babel.extractors`` entry point in ``pyproject.toml``.

---

> For a complete page index, fetch /kida/llms.txt.

Open LLM text
(/kida/api/babel/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fbabel%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fbabel%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fbabel%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fkida%2Fapi%2Fbabel%2Findex.txt)

Module

#
`babel`

Babel extraction plugin for Kida templates.

Usage in`babel.cfg`::

```
[kida: templates/**.html]
encoding = utf-8
```

Requires the`babel`package to be installed. Registration is via
the`babel.extractors` entry point in `pyproject.toml`.

1Function

## Functions

`extract`

4

`Any`

▼

Babel extraction method for Kida templates.

Yields ``(lineno, function, messag…

`def extract(fileobj: IO[bytes], keywords: list[str], comment_tags: list[str], options: dict[str, Any]) -> Any`

Babel extraction method for Kida templates.

Yields`(lineno, function, message, comments)`tuples compatible
with the Babel extraction interface.

##### Parameters

Name
Type
Description

`fileobj`
`IO[bytes]`

`keywords`
`list[str]`

`comment_tags`
`list[str]`

`options`
`dict[str, Any]`

##### Returns

`Any`
