vue-i18n
vue-i18n copied to clipboard
Interpolations without provided value should remain in the translation result
trafficstars
Clear and concise description of the problem
We're upgrading to v9.x. When translating a string, we want to perform some extra logic on the result, using special tags {tag} to be replaced in the translated result. In V8, the translated value still contained those values, but in V9 it doesn't anymore.
Input: { val: "I am a special {tag} string" }, calling t("val").
V8 result: I am a special {tag} string
V9 result: I am a special string
Suggested solution
Let's add an option to createI18n to toggle between those behaviors globally if it's not there.
Alternative
No response
Additional context
No response
Validations
- [X] Read the Contributing Guidelines
- [X] Read the Documentation
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.