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 };
|
return { namespaces: [...new Set(namespaces)], languages };
|
||||||
}
|
}
|
||||||
|
|
||||||
public translate(key: string, options: TOptionsBase = {}) {
|
public translate(
|
||||||
const lng = options.lng || this.options.defaultLanguage;
|
key: string,
|
||||||
|
options?:
|
||||||
|
| TOptionsBase
|
||||||
|
| {
|
||||||
|
[key: string]: string;
|
||||||
|
},
|
||||||
|
) {
|
||||||
|
const lng = options?.lng || this.options.defaultLanguage;
|
||||||
return i18next.t(key, { lng, ...options });
|
return i18next.t(key, { lng, ...options });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue