useTranslation
FunctionuseTranslation(msg1?: {}, msg2?: {}, msg3?: {}): (id: string, values?: any) => stringReturns a function to use Intl translation.
If no message is passed in, the default message of jimu-core will be used
example:
const translate = useTranslate(jimucoreMessages, widgetMessages)
translate('ok')Parameters
| Parameter | Type |
|---|---|
msg1 | {} |
msg2 | {} |
msg3 | {} |
Returns
(id: string, values?: any) => stringfunction(id: string, values?: any): stringParameters
| Parameter | Type |
|---|---|
id | string |
values | any |
Returns
string