Marco
Marco

Reputation: 27

Flitter Firebase multi language

I'm developing an application using Flutter and Firebase. I need to support multiple languages and I was wondering about what is the best solution to do that... Can I keep the strings in Firebase and fetch them without downloading them each time I need? When the user select a language the first, usually it does not change, but sometimes it could. Thanks!

Upvotes: 1

Views: 838

Answers (1)

Houssem
Houssem

Reputation: 7598

I can't understand why you want to use multi-languages feature using Firebase. In any app at least there are static texts.So at least for that part you don't need the translation stored in the Firebase (performance issue). I suggest to have a look at this package easy_localization : https://pub.dev/packages/easy_localization Why you should use static translation: when using non static translation (downloaded from Firebase) :

  • You have to download the translations : App does work only if connected to network (at least first time or after user clear the cache of the application)
  • You have to cache the result : using shared_preferences
  • You have to fetch the translations from cache every time.
    If you still insist about using Firebase.You can see a similar question for android (answered by GDE): Firebase Multi-Language support: Is possible?

Upvotes: 2

Related Questions