Using the Tolgee library in React for switching between two languages in application
This is what I'm trying,
import { useTranslate } from '@tolgee/react';
const { t: translate } = useTranslate();
setMenu(
apples.map((item: any) => {
item.name = translate(item.key, { ns: item.ns });
return item;
})
);
In console I'm getting the value of item.name as translate(key | ns) And in screen I'm getting the output value in single word as string, So I want to get the same output in console as what I'm getting in screen after DOM manipulation