# t
translation function. It is used to set multilingual. For details, please refer to the internationalization in [Multidimensional Table Automation Plugin Development Guide](https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/base-extensions/base-automation-extensions/base-automation-extension-development-guide). <br>This function can also set the help and prompt text of the form.

## input
```
t(key, param)
```

name | Data Type | Required | Description
---|---|---|---
key | string | is | The key of a certain language in the internationalization resource, for details, refer to [Multidimensional Table Automation Plugin Development Guide](https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/base-extensions/base-automation-extensions/base-automation-extension-development-guide).
param | ```js<br>{<br>[key: string]: TLink | TIcon | THighlight;<br>} | No | controls text links, icons, highlighting.<br>It can only be used for the description field of the basekit.addAction input parameter, and the help and tooltip attributes of the formItems field of the basekit.addAction field.

```js
type TLink = {
     type: 'link';
     value: string;
     link: string;
};
type TIcon = {
     type: 'icon';
     value?: string;
     /** URL that the hyperlink points to */
     link?: string;
     /** URL of the icon */
     src: string;
};
type THighlight = {
     type: 'highlight';
     value: string;
     color: string;
};
```

## output
Internationalized string or object. For details, please refer to the internationalization in [Multidimensional Table Automation Plugin Development Guide](https://open.feishu.cn/document/uAjLw4CM/uYjL24iN/base-extensions/base-automation-extensions/base-automation-extension-development-guide).

## sample code
```js
import { basekit, Component, ParamType, getBasekitUrl, t } from '@lark-opdev/block-basekit-server-api';

basekit.setI18n({
   messages: {
     'zh-CN': {
       description: "View {doc}",
       usage: 'Documentation',
       help: 'This is the icon {icon}',
       tooltip_111: 'This is {highlight}',
     },
   }
});

basekit. addAction({
   description: t('description', {
     // Replace the doc variable in the copy with a jumpable link
     doc: {
       type: 'link',
       value: t('usage'),
       link: 'https://your.doc.com',
     },
   }),
   formItems: [
     {
       itemId: 'text',
       label: 'Test',
       help: t('help', {
         // Replace the icon variable in the text with a jumpable icon
         icon: {
           type: 'icon',
           src: 'https://your.img.com',
           link: 'https://your.link.com'
         }
       }),
       tooltip: t('tooltip_111', {
         // Replace the highlight variable in the text with the highlighted text
         highlight: {
           type: 'highlight',
           value: 'Highlight copy',
           color: 'red',
         }
       }),
       required: true,
       component: Component. Input,
       componentProps: {
         mode: 'textarea',
         placeholder: 'Test',
       }
     },
     //....
```