I am using key - value translation-S.of(context).translation_key
- but I need something like "Translation string".translate()
or translate("Translation string")
How can I do this ?
I am using localizely plugin. Flutter version is lastest.
Attention: I am not asking for translate("key")
I am asking translate("Translate String")
I want to give a value and get current translation value.
I'd suggest you to do it the other way:
Your method:
And you'd use it:
For simplicity I hardcoded the things, but a better solution is to load the keys through a json file, here's a better approach