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

Function getI18n

packages/renderer-core/src/utils/common.ts:137–143  ·  view source on GitHub ↗
(key: string, values = {}, locale = 'zh-CN', messages: Record<string, any> = {})

Source from the content-addressed store, hash-verified

135 * @param {*} messages 国际化语言包
136 */
137export function getI18n(key: string, values = {}, locale = 'zh-CN', messages: Record<string, any> = {}) {
138 if (!messages || !messages[locale] || !messages[locale][key]) {
139 return '';
140 }
141 const formater = new IntlMessageFormat(messages[locale][key], locale);
142 return formater.format(values);
143}
144
145/**
146 * 判断当前组件是否能够设置ref

Callers 2

BaseRendererClass · 0.90
common.test.tsFile · 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…