EU Parliament Monitor — API Documentation - v0.9.24
    Preparing search index...

    Function getOgLocale

    • Return the BCP-47 locale code for a given ISO 639-1 language code. Falls back to en_GB for unknown languages — the same fallback the rest of the site uses for missing translations.

      Parameters

      • lang: string

        ISO 639-1 language code (e.g., "en", "sv")

      Returns string

      BCP-47 language_TERRITORY locale (e.g., "en_GB")