I do use i18next-react and try to work with formating. So I've setup in my init formating like that:
i18n.use(initReactI18next).init(
{
...
interpolation: {
escapeValue: false,
// eslint-disable-next-line no-unused-vars
format: function (value, format, lng) {
if (format === 'uppercase') return value.toUpperCase();
if (format === 'lowercase') return value.toLowerCase();
if (format === 'capitalize') return `${value.substr(0, 1).toUpperCase()}${value.substr(1)}`;
return value;
},
},
...
},
If I do in my react-component this:
import i18next from 'i18next';
i18next.format('edit', 'capitalize'),
It works like expected... the word edit becomes capital lettered.
BUT, how do I use it with my own translation: t('edit')
I wonder if there is a way to call the formating with react-i18next instead of i18next package
If I try with: t('{{edit, capitalize}}'),, I got this error:

What I try is at least to decide in my t()-MEthod to use a given format on this string.
