i18n.catalog

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Message catalog — load JSON translation files.

Simple key-value translations from JSON files. Lazy-loaded per locale. Missing key returns the source string with a warning (never breaks rendering).

Message catalog — load JSON translation files.

Simple key-value translations from JSON files. Lazy-loaded per locale. Missing key returns the source string with a warning (never breaks rendering).

i18n.catalog

Name Type Default Description
type —
qualified_name —
element_type —
description —
source_file —
line_number —
is_autodoc —
autodoc_element —
_autodoc_template —
_autodoc_url_path —
_autodoc_page_type —
title —
doc_content_hash —

Symbols on this page

MessageCatalog
class

Manages translation catalogs from JSON files.

Usage::

catalog = MessageCatalog("locales")
catalog.load("es")
msg = catalog.translate("es", "Hello, {name}!", name="Alice")

View source · /home/runner/work/chirp/chirp/site/../src/chirp/i18n/catalog.py:1