Open
Description
Clear and concise description of the problem
If one wants to translate a key
to a specific locale, this is possible by stating the locale in the TranslateOptions
object.
However, the only signatures available taking this parameter are:
t(key, plural, TranslateOptions)
t(key, defaultMsg, TranslateOptions)
t(key, interpolations, TranslateOptions)
So the easiest solution would be using the plural-variant. e.g.:
t('message.key', 1, { locale: 'fr' })
But i should not be required to state a plural option, if i don't need it.
Suggested solution
The solution would be to provide the following additional signature:
t(key,TranslateOptions)
Then this simple and logical solution would be possible:
t('message.key', { locale: 'fr' })
Alternative
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.