betty.locale.localized module

Describe localized information.

class betty.locale.localized.Localized[source]

Bases: LinkedDataDumpable

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

__init__(*args: Any, locale: str | None = None, **kwargs: Any)[source]
async dump_linked_data(project: Project) DumpMapping[Dump][source]

Dump this instance to JSON-LD.

async classmethod linked_data_schema(project: Project) DumpMapping[Dump][source]

Define the JSON Schema for betty.json.linked_data.LinkedDataDumpable.dump_linked_data().

locale: str | None
betty.locale.localized.negotiate_localizeds(preferred_locales: str | Locale | Sequence[str | Locale], localizeds: Sequence[Localized]) Localized | None[source]

Negotiate the preferred localized value from a sequence.