Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.locale.localized module

Describe localized information.

class betty.locale.localized.Localized

  Bases: `LinkedDataDumpable`

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

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

    Dump this instance to JSON-LD.

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

    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

  Negotiate the preferred localized value from a sequence.