Skip to main content
Question

Flutter - Change locale at runtime

  • 22 May 2024
  • 1 reply
  • 98 views

Hello !

I’m using Flutter & RevenueCat for my app since a few months, and I’m on my way to make my app available for multiple countries.

I followed the docs to add localizations on both store, and everything seems to be good on my side.

In my app, the device’s locale is used as default language but I leave the choice to the user to change it in the application settings.

By doing that, I noticed that the informations fetched from revenue cat was still on the original language. I was wondering if it’s possible to change it on runtime ? How could I handle this scenario ?

 

I found a related topic but I’m not sure if the answer is still up to date or relevant.

 

If you have encounter the same situation, can you give me some hints ?

Thank you for your time !

This post has been closed for comments

1 reply

Userlevel 4
Badge +6

Hey @talemeapp,

Ryan’s response in the post that you linked is still relevant. Another thing that you can do to test localization is to change the “Default Localization” in Xcode before building your app, to the language that you’d like to test.