nationid - v2.2.1
    Preparing search index...

    Module i18n

    Localized error-message catalog for ParseError.

    Public API:

    • getErrorMessage(error, locale?, documentName?) — full message with optional document-name interpolation and locale fallback.
    • getErrorTemplate(kind, locale?) — raw template (no interpolation).
    • SUPPORTED_LOCALES, DEFAULT_LOCALE, Locale type.

    Locale strings live in ./locales/{es,en,pt}.ts as standalone modules so downstream consumers can import a single locale via nationid/i18n/{lang} and pay only for what they use.

    Locale
    DEFAULT_LOCALE
    SUPPORTED_LOCALES
    getErrorMessage
    getErrorTemplate