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
I think it would be good to have a getFixedExists function similar to the getFixedT
Motivation
When you do translations on the server side - i.e. emails that are language-specific - then you want to explicitly set a language.
For that the getFixedT function comes in handy.
It would also be great in this scenario to have the same language restricted getFixedExists function.
Example
const t = getFixedT('de');
const exists = getFixedExists('de');
if (exists(email.feature.text)) {
const text = t('email.feature.text')
// do more useful stuff here
}
The text was updated successfully, but these errors were encountered:
gerwinbrunner
changed the title
getFixedExists
getFixedExists should support function getFixedT
Mar 28, 2024
馃殌 Feature Proposal
I think it would be good to have a
getFixedExists
function similar to thegetFixedT
Motivation
When you do translations on the server side - i.e. emails that are language-specific - then you want to explicitly set a language.
For that the
getFixedT
function comes in handy.It would also be great in this scenario to have the same language restricted
getFixedExists
function.Example
const t = getFixedT('de');
const exists = getFixedExists('de');
if (exists(
email.feature.text
)) {const text = t('email.feature.text')
// do more useful stuff here
}
The text was updated successfully, but these errors were encountered: