@intlayer/core
Version:
Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.
17 lines • 427 B
JavaScript
import dictionaries from "@intlayer/dictionaries-entry";
import { getDictionary } from "./getDictionary.mjs";
const getIntlayer = (key, locale, plugins) => {
const dictionary = dictionaries[key];
if (!dictionary) {
throw new Error(`Dictionary ${key} not found`, dictionaries);
}
return getDictionary(
dictionary,
locale,
plugins
);
};
export {
getIntlayer
};
//# sourceMappingURL=getIntlayer.mjs.map