geoview-core - v2.3.0
    Preparing search index...

    Function getLocalizedMessage

    • Returns proper language GeoView localized values from map i18n instance.

      A GeoView message key is dot-namespaced with no spaces (e.g. warning.layer.slowRender). When the provided value does not match that shape it is treated as already-final raw text (for example a plugin-provided message) and returned verbatim, so callers passing literal strings don't trigger a misleading missing-key error. Values that do look like a key are still validated, logging an error when the key is missing so genuine typos are surfaced.

      Parameters

      • language: TypeDisplayLanguage

        The language to get the message in

      • messageKey: string

        The localize key to read the message from, or already-final raw text

      • params: Record<string, unknown> | undefined = undefined

        Optional record of named parameters for i18next interpolation

      Returns string

      The translated message with values replaced, or the raw text when not a key