UNPKG

next-intl

Version:

Internationalization (i18n) for Next.js

2 lines (1 loc) 290 B
import{cache as e}from"react";import{createTranslator as t}from"use-intl/core";import a from"./getConfig.js";var s=e((async function(e){let s,o;"string"==typeof e?s=e:e&&(o=e.locale,s=e.namespace);const r=await a(o);return t({...r,namespace:s,messages:r.messages})}));export{s as default};