betty.localized module

The localized API, to describe data that is localized.

class betty.localized.Localized

Bases: ABC

A resource that has a locale, e.g. contains information in a specific locale.

abstract property locale: Locale | None

The locale the data in this instance is in.

final class betty.localized.LocalizedStr

Bases: Localized, str

A string that has a locale.

__init__(string: str, *, locale: Locale | None = None)
static __new__(cls, string: str, *, locale: Locale | None = None)
property locale: Locale | None

The locale the data in this instance is in.