DEV Community

Cover image for How to i18n in Flutter?

How to i18n in Flutter?

Pedro Massango on July 17, 2019

UPDATE: The plugin used in this article was deprecated, Use it at your own risk. After some months (maybe a year) working with Flutter ...
Collapse
 
marcossevilla profile image
Marcos Sevilla •

This plugin is deprecated now (plugins.jetbrains.com/plugin/10128...).

These are the new alternatives:

Hope this is helpful and thanks to Pedro for the hack!

Collapse
 
victoriavhe profile image
victoria h. edon •

Hi Pedro, could you specify what Flutter version that you used?
I tried to use it exactly as your tutorial on Flutter 1.12.13+hotfix.8 and it doesn't work. It always returns null. I've run flutter doctor and there was no issues found.

Collapse
 
pedromassango profile image
Pedro Massango •

Hi @victoria

I'm using the same version as you (1.12.13+hotfix.8). Can I see your MaterialApp configuration? Maybe you are missing something there.

Sorry for the late repply

Collapse
 
hdimessi profile image
Hussein Dimessi •

Hi Pedro,
Thanks for the post, but I have a small issue with the plugin, the extract feature doesnt work, it doesnt actually add the key-value to the arb files, each time I have to do it manually, do you have any thoughts about what could be wrong ?

Collapse
 
bryanmuloni profile image
Sirikye Brian •

Hi Pedro, thank you for the article. My question is if this approach can be blended with Sharedpreferences and Provider for keeping track of a given locale and state management.

Collapse
 
pedromassango profile image
Pedro Massango •

Yes and this approach already update your app if the user change the device's language

Collapse
 
bryanmuloni profile image
Sirikye Brian •

Okay, how possible can I incorporate those. Is it allowed to update the generated files.
If possible show me a basic implementation.
Thank you.

Thread Thread
 
pedromassango profile image
Pedro Massango •

The plugin was deprecated, please find another way to localize your app. Read more in the plugin's page

Thread Thread
 
bryanmuloni profile image
Sirikye Brian •

Exactly that's what I saw while reading about the plugin here: plugins.jetbrains.com/plugin/10128...
Thank you.

Collapse
 
kminakovsky profile image
Кирилл Минаковский •

Just for you know, .abr isn't 'Android Bundle Resource.'
github.com/google/app-resource-bun...
Btw, thx for the article.

Collapse
 
minhvuongrbs profile image
minhvuongrbs •

Do we have the command to use it in other IDE like VSCode?

Collapse
 
pedromassango profile image
Pedro Massango •

Yes we have.