UNPKG

next-intl

Version:

Internationalization (i18n) for Next.js

11 lines (8 loc) 265 B
import { cache } from 'react'; import getConfig from './getConfig.js'; async function getLocaleCachedImpl() { const config = await getConfig(); return config.locale; } const getLocaleCached = cache(getLocaleCachedImpl); export { getLocaleCached as default };