MCPcopy Create free account
hub / github.com/formkit/formkit / localize

Function localize

packages/inputs/src/features/localize.ts:14–31  ·  view source on GitHub ↗
(
  key: string,
  value?: string
)

Source from the content-addressed store, hash-verified

12 * @public
13 */
14export default function localize(
15 key: string,
16 value?: string
17): (node: FormKitNode) => void {
18 return (node: FormKitNode): void => {
19 node.store.set(
20 createMessage({
21 key,
22 type: 'ui',
23 value: value || key,
24 meta: {
25 localize: true,
26 i18nArgs: [node],
27 },
28 })
29 )
30 }
31}

Callers 5

FormKitSummaryFunction · 0.90
schema.tsFile · 0.90
setupFunction · 0.90
filesFunction · 0.85
button.tsFile · 0.85

Calls 1

createMessageFunction · 0.90

Tested by

no test coverage detected