Function: useValaxyI18n()
ts
function useValaxyI18n(): object;
Defined in: packages/valaxy/client/composables/locale.ts:81
Experimental
以 $locale:
开头的 key 会被认为是国际化的 key 会从 locales/ 目录中获取对应的翻译
Returns
$t()
ts
$t: (key) => string;
vue-i18n t function
translate $locale:key
Parameters
key
string
Returns
string
$tO()
ts
$tO: <T>(data?) => string | T;
translate object
{ "zh-CN": "你好", "en": "Hello" }
Type Parameters
T
T
= string
Parameters
data?
string
| Record
<string
, T
>
Returns
string
| T
locale
ts
locale: WritableComputedRef<string, string>;