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
Please implement this essential function of i18next. These keys are removed as unused even if allowDynamicKeys turned on. Maybe you don't consider the case that the input of the function t can be an array. Here is the link to Multiple fallback keys - i18next essentials.
Motivation
Calling the t function with an array of keys enables you to translate dynamic keys providing a non specific fallback value.
Example
As a sample think of an error code you get and you like to show a specific warning in some cases:
keys
{
"error": {
"unspecific": "Something went wrong.",
"404": "The page was not found."
}
}
sample
// const error = '404';
i18next.t([`error.${error}`, 'error.unspecific']); // -> "The page was not found"
// const error = '502';
i18next.t([`error.${error}`, 'error.unspecific']); // -> "Something went wrong"
The text was updated successfully, but these errors were encountered:
🚀 Feature Proposal
Please implement this essential function of i18next. These keys are removed as unused even if allowDynamicKeys turned on. Maybe you don't consider the case that the input of the function t can be an array. Here is the link to Multiple fallback keys - i18next essentials.
Motivation
Calling the t function with an array of keys enables you to translate dynamic keys providing a non specific fallback value.
Example
As a sample think of an error code you get and you like to show a specific warning in some cases:
keys
sample
The text was updated successfully, but these errors were encountered: