martinandert / react-translate-component

A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Translation won't work if string contains `.`

erpardeepjain opened this issue · comments

Support I have string

Explore and get a feel for the game before moving onto micro-level. You can play for 1 hour for just ₹50. And win lot more.

If I apply translation for this string it is not working, My observation is beacuse string contains . and translation is not working after ., Any comments or suggestion on this.

The dot is used to separate translation keys. You can set a custom separator like this:

counterpart.setSeparator('*');

That's great, I was not aware about this. thanks.
Don't you think by default setSeparator value should not be . as many of the developer are not aware of this and many of the strings contains .. Just a suggestion.