Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Function baseLanguageOf

    • Collapse any language code the platform might hold — fr, fr_CH, FR-ca, fr — to its supported base code, or null when it is not one of the five.

      null, not 'en', for the unknown case. The messaging helpers that pick copy for a patient default an unknown language to English because SOME copy has to be sent; routing must not, because "we do not know what this patient speaks" and "this patient speaks English" would then rank the roster identically — English speakers first — for a patient who might well be neither.

      Parameters

      • code: string | null | undefined

      Returns "en" | "es" | "de" | "fr" | "it" | null