Any way to ignore interpolated values
julianpoy opened this issue Β· comments
Hey there!
I use ngx-translate to represent translations and was wondering if there was a way to ignore interpolated values.
For example:
{
"app.welcome": "Welcome {{name}}",
}
Right now it translates both "Welcome" and "name" to the target language. The goal would be for it to only translate "welcome".
Hi, thank you for your comment.
It would be a great feature to handle these situations. I will try to add it asap π.
Hi @julianpoy
With v1.1.0 it ignores the values in translation that are in double curly braces. π₯³
Use {{word}} style on your object as you mentioned above.
Example:
{
"one": "Welcome {{name}}"
}
...translating to spanish
{
"one": "Bienvenido {{name}}"
}
@ParvinEyvazov This is awesome! Thank you very much for implementing this change. Will try this package out now!
@ParvinEyvazov
In react they use <{value} instead of. {}., could you add support for this?
Thank you! amazing tool!
Hi @daniel-farina, Thank you for your great suggestion.
I will try to add this feature asap π
Hi @daniel-farina, Thank you for your great suggestion.
I will try to add this feature asap π
Correction above, not <{} but just single {}
Tysm! As soon as it's done I'll add it to some docs for people to use it to help translate our app.
Hey @daniel-farina & @trevorblades πββοΈ
I have great news!
Now you can use {word} syntax to ignore unwanted translations with version 1.4.0. π
{{word}} syntax is still available too
You're the best, @ParvinEyvazov! Thank you for this great tool πββοΈ