@terrestris/shogun-util
    Preparing search index...
    • Returns the localized version of the given string for the given locale.

      If either no localization pattern or no localized version is found the original string is returned or an empty string is returned respectively.

      Parameters

      • Optionalstr: string

        The string to localize, it may contain localization patterns like "$de:German Text$en:English Text".

      • locale: string = 'en'

        The locale to use, defaults to 'en'.

      Returns string

      The localized string or the original string if no localization.