site/node_modules/@citation-js/plugin-csl/lib-mjs/locales.js
2024-10-14 08:09:33 +02:00

12 lines
323 B
JavaScript

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 };