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
Is your feature request related to a problem? Please describe.
We use i18next (vue-i18next + react, etc.) and the default interpolation uses double braces {{ param }}.
While we can set the interpolation on i18next to use singles braces like vee-validate, this leads to confusion as any documentation or examples online are going to use double braces.
Also, theoretically we could only use single braces for texts that feed into vee-validate, but again this is mixing and inevitably leads to issues down the road. We also have a mix of React and Vue so there would be inconsistency amongst projects (micro-frontends).
Describe the solution you'd like
The ability to customize the interpolation, at minimum to allow double braces but ideally for flexibility it could take any pattern to align with other standards.
Describe alternatives you've considered
Described in the feature request, but generally setting the other libraries to single braces or mixing.
The text was updated successfully, but these errors were encountered:
I'm going to attempt to implement this myself, it looks like this would just be an option to the constructor and then it'd be passed down through all calls to interpolate.
zleight1
added a commit
to zleight1/vee-validate
that referenced
this issue
Apr 15, 2024
Allow for specifying custom interpolation options for i18n.
This is useful for custom interpolation patterns, such as `{{` and `}}`.
Tests added, and scoped to the i18n module.
Closeslogaretm#4726
Is your feature request related to a problem? Please describe.
We use i18next (vue-i18next + react, etc.) and the default interpolation uses double braces
{{ param }}
.While we can set the interpolation on i18next to use singles braces like vee-validate, this leads to confusion as any documentation or examples online are going to use double braces.
Also, theoretically we could only use single braces for texts that feed into vee-validate, but again this is mixing and inevitably leads to issues down the road. We also have a mix of React and Vue so there would be inconsistency amongst projects (micro-frontends).
Describe the solution you'd like
The ability to customize the interpolation, at minimum to allow double braces but ideally for flexibility it could take any pattern to align with other standards.
Describe alternatives you've considered
Described in the feature request, but generally setting the other libraries to single braces or mixing.
The text was updated successfully, but these errors were encountered: