Remote, dynamic localization in flutter apps

79 views Asked by At

I'm building flutter desktop application and need to implement localization/internationalization. I'm keeping the translations in the sql db and fetching via webapi. When the string is edited/changed the apps is not updated(even after restarting) since the arb fiels are generated and kept under the lib.

Is there any way of solving the issue, without using "lokalise" or another saas? i've tried moving arb files outside the lib, didn't work

1

There are 1 answers

0
Ahmad Darwesh On

Optimal Approach for Dynamically Loading Localization Files in Desktop Applications

In my opinion an effective solution involves implementing a loading screen when the desktop application initializes.. Check internet connection if the user is online then during this phase, you can seamlessly load the new localization file integrating it directly into your program's code and save it into your program files

And if the user is offline load the old file we are saved from program files and use it

Note: in this case you need internet connection first time you open the program Alternativliy you need to provide localization file with program when install it