- createI18n<T>(data, defaultLanguage?): {
$$t: ((path: keyof Flat<T, "">, ...args: string[]) => string);
$t: Ref<((path: keyof Flat<T, "">, ...args: string[]) => string), ((path: keyof Flat<T, "">, ...args: string[]) => string)>;
t: ((path: keyof Flat<T, "">, ...args: string[]) => string);
} Type Parameters
- T extends Record<string, any>
Parameters
- data: {
en: undefined | T;
ru: undefined | T;
zh-CN: undefined | T;
zh-TW: undefined | T;
}en: undefined | T
ru: undefined | T
zh-CN: undefined | T
zh-TW: undefined | T
- defaultLanguage:
| "en"
| "zh-CN"
| "zh-TW"
| "ru" = 'en'
Returns {
$$t: ((path: keyof Flat<T, "">, ...args: string[]) => string);
$t: Ref<((path: keyof Flat<T, "">, ...args: string[]) => string), ((path: keyof Flat<T, "">, ...args: string[]) => string)>;
t: ((path: keyof Flat<T, "">, ...args: string[]) => string);
}
$$t: ((path: keyof Flat<T, "">, ...args: string[]) => string)
- (path, ...args): string
Parameters
- path: keyof Flat<T, "">
Rest
...args: string[]
Returns string
$t: Ref<((path: keyof Flat<T, "">, ...args: string[]) => string), ((path: keyof Flat<T, "">, ...args: string[]) => string)>
t: ((path: keyof Flat<T, "">, ...args: string[]) => string)
- (path, ...args): string
Parameters
- path: keyof Flat<T, "">
Rest
...args: string[]
Returns string
create i18n