Keys should be added to translation.json file, in order to be translated to other languages.
A hook expose the function you need to translate content.
import { useTranslation } from '@pancakeswap/localization'
...
const { t } = useTranslation()
...
t(key, data)
- key is the crowdin key of the string you want to translate.
- data dynamic variables
If a Crowdin translation like this You have %num% left in your wallet
- would look something like:
t(`You have %num% left in your wallet`, { num: cakeBalance })