Cannot translate with key containing special characters
DongPhamBK opened this issue · 1 comments
DongPhamBK commented
Hello, I'm using your library with a sentence with periods, commas and spaces, for example: In file i18n/en.json
{
"'Your phone' is available now.": "'Your phone' is available now."
}
and in file i18n/es.json
{
"'Your phone' is available now.": "'Tu teléfono' ya está disponible."
}
in my flutter code, I used:
I18nText("'Your phone' is available now.")
Text(FlutterI18n.translate(context, "'Your phone' is available now."))
But it seems the code is not working!!!
Looking forward to your reply! Thanks !!!
ilteoood commented
The one that you used is not a key but an entire sentence.
You should use a key like: phoneAvailable
.