site/node_modules/@citation-js/plugin-csl/lib-mjs/locales.js

12 lines
323 B
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import { util } from '@citation-js/core';
import defaultLocales from './locales.json';
const locales = new util.Register(defaultLocales);
const fetchLocale = lang => {
if (locales.has(lang)) {
return locales.get(lang);
} else {
return locales.get('en-US');
}
};
export default fetchLocale;
export { locales };