Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 2x 6x 19x 6x 11x | import { I18n } from "@embra/i18n";
export { default as Trans } from "./Trans.astro";
export const createStaticI18n = ({ locales, fallback }) => {
const instances = {};
const getI18n = (lang = fallback) => (instances[lang] ??= new I18n(lang, locales, { fallback }));
return {
getI18n,
getT: (lang) => getI18n(lang).t,
};
};
|