This commit is contained in:
MathieuG-P
2022-07-19 20:57:05 +02:00
parent 587ad5703d
commit a81784e44f
@@ -5,6 +5,7 @@ export function useTranslation(): (translationKey: string, args?: Record<string,
const i18nService = I18nService.getInstance();
return (key: string, args?: Record<string, string>) => {
if(!key){ return key; }
const tranlatables = key.split(" ");
return tranlatables.map((key) => i18nService.translate(key, args)).join(" ");
}