betty.locale.localized module - Betty documentation

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: `object`

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

  property locale: str

    The locale the data in this instance is in.

class betty.locale.localized.LocalizedStr

  Bases: `Localized`, `str`

  A localized string.

  static __new__(cls, localized: str, *, locale: str = 'und')

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.