Server exports#
From @veap/intl/server, use getTranslation(localeOverride?, timeZoneOverride?) to obtain a translator function, getCurrentLocale() for the request's resolved locale, getIntlConfig() for merged configuration, getMessages(locale) for a dictionary, and registerMessages / registerMessageLoader to add message sources.
Client exports#
From @veap/intl/client, use I18nProvider, useLocale, useSupportedLocales, useTimeZone, useTranslation or its alias useTranslations. These hooks require a provider above the component.
Message loader priority#
A loader can be a function or a record with id, load/loader and priority. Lower priorities load first and higher priorities override lower ones. Keep plugin IDs stable and test the final merged dictionary to avoid accidental overrides.