UNPKG

react-intlayer

Version:

Easily internationalize i18n your React applications with type-safe multilingual content management.

12 lines 436 B
import { getTranslation } from "@intlayer/core"; import { IntlayerServerContext } from "./IntlayerServerProvider.mjs"; import { getServerContext } from "./serverContext.mjs"; const t = (multilangContent, locale) => { const currentLocale = getServerContext(IntlayerServerContext); const localeTarget = locale ?? currentLocale; return getTranslation(multilangContent, localeTarget); }; export { t }; //# sourceMappingURL=t.mjs.map