Closed Antoine-lb closed 1 year ago
In the resource file use {{ }}
for the variable (as you have mentioned here):
"notification": "you have {{notification_count}} notifications"
To call it, use the variable passed as a parameter:
$t('notification', { notification_count: 5 })
Hello 👋 I could not find in the documentation how to insert variables inside of a translation string (e.g.
you have {{notification_count}} notifications
). Is this functionality not supported or I just can't find it?An example of
react-i18next
approach of it: https://react.i18next.com/latest/trans-component#using-with-react-componentsThanks for your time