mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-04-01 03:32:00 +05:00
fix(language): fixing types
This commit is contained in:
parent
26d94bed0c
commit
7f5a42b159
1 changed files with 9 additions and 2 deletions
|
@ -54,8 +54,15 @@ export default class InternationalizationService {
|
|||
return { namespaces: [...new Set(namespaces)], languages };
|
||||
}
|
||||
|
||||
public translate(key: string, options: TOptionsBase = {}) {
|
||||
const lng = options.lng || this.options.defaultLanguage;
|
||||
public translate(
|
||||
key: string,
|
||||
options?:
|
||||
| TOptionsBase
|
||||
| {
|
||||
[key: string]: string;
|
||||
},
|
||||
) {
|
||||
const lng = options?.lng || this.options.defaultLanguage;
|
||||
return i18next.t(key, { lng, ...options });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue