parent
05da6b3c50
commit
fa60cab587
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @description The directory name used in require.context must match the language configuration names defined in lang-config-map.ts.
|
||||
* @example Directories like 'en-US' or 'zh-CN' should correspond exactly to the configuration names in lang-config-map.ts.
|
||||
*/
|
||||
|
||||
// @ts-ignore
|
||||
const requireContext = require.context(`./ru-RU`, false, /\.ts$/);
|
||||
|
||||
let languageConfig: Record<string, string> = {};
|
||||
|
||||
requireContext.keys().forEach((fileName: any) => {
|
||||
const moduleConfig = requireContext(fileName).default;
|
||||
languageConfig = {
|
||||
...languageConfig,
|
||||
...moduleConfig
|
||||
};
|
||||
});
|
||||
|
||||
export default languageConfig;
|
||||
Loading…
Reference in new issue