MCPcopy Create free account
hub / github.com/Lobos/react-ui / setLang

Function setLang

src/lang/index.js:8–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6export let LOCATION = 'zh-cn';
7
8export function setLang () {
9 let args = [].slice.call(arguments);
10 args.forEach(function (arg) {
11 if (typeof arg === 'object') {
12 langData = merge({}, langData, arg);
13 } else if (typeof arg === 'string') {
14 langData = merge({}, langData, require(`./${LOCATION}/${arg}`));
15 }
16 });
17}
18
19export function getLang (path, def) {
20 let result = langData;

Callers 9

lang.jsFile · 0.90
Modal.jsFile · 0.90
Upload.jsFile · 0.90
FormControl.jsFile · 0.90
Filter.jsFile · 0.90
validation.jsFile · 0.90
datetime.jsFile · 0.90
Fetch.jsFile · 0.90
Datetime.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…