MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / convertToI18NObject

Function convertToI18NObject

packages/utils/src/misc.ts:32–35  ·  view source on GitHub ↗
(v: string | any, locale: string = 'zh-CN')

Source from the content-addressed store, hash-verified

30}
31
32export function convertToI18NObject(v: string | any, locale: string = 'zh-CN') {
33 if (isI18NObject(v)) return v;
34 return { type: 'i18n', use: locale, [locale]: v };
35}
36
37export function isString(v: any): v is string {
38 return typeof v === 'string';

Callers 1

misc.test.tsFile · 0.90

Calls 1

isI18NObjectFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…