You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using react-18next and the useTranslation hook to import one or more namespaces per code file which are consequentially omitted from the actual translation function-call, but EasyI18n doesn't inspect the useTranslation hook and expects the translation function to always have a fully qualified translation-key.
Would it be possible to grab the namespaces from the useTranslation hook and then inspect the t-calls with those namespaces in memory?
Here's an example:
const{ t }=useTranslation(['admin','common']);consttranslatedText=t('User.FirstName');
The corresponding translation files would be common.js and admin.js with either one containing the
{
"User": {
"FirstName": "First Name"
}
}
Thanks in advance
The text was updated successfully, but these errors were encountered:
We're using
react-18next
and theuseTranslation
hook to import one or more namespaces per code file which are consequentially omitted from the actual translation function-call, but EasyI18n doesn't inspect theuseTranslation
hook and expects the translation function to always have a fully qualified translation-key.Would it be possible to grab the namespaces from the
useTranslation
hook and then inspect thet
-calls with those namespaces in memory?Here's an example:
The corresponding translation files would be
common.js
andadmin.js
with either one containing theThanks in advance
The text was updated successfully, but these errors were encountered: