Open Pitbi opened 4 years ago
Why would you manipulate the key? That would be unresolvable from i18next.
I would like to POST the key in a tool. The API of the tool requests a payload like {key: 'my_i18n_key'}
.
That tool is not our https://locize.com I guess...
The only option currently I see to do so is overriding the ajax: https://github.com/i18next/i18next-xhr-backend#backend-options
No, you right. It's an other.
Ok, that's what I did. But it's a shame, I create a custom request only to change the payload sent. So I guess you have no interest in adding this option?
Thank you for your follow-up.
If you like you can add something like done on load: https://github.com/i18next/i18next-xhr-backend/blob/master/src/index.js#L56
having a default option for the create call parseBeforeAdd
or something like that?
Ok, I can think about that.
I'll be back soon :)
Hey,
Would it be possible to add the possibility of having control over the payload sent on POST to
addPath
?It would be useful to be able to choose the payload key.
For example:
{key: 'my_i18n_key'}
instead of{my_i18n_key: 'my_i18n_key'}
Thank you for reading me.