Welcome, Guest
Username: Password: Remember me

TOPIC: Load translaltions for each language ON DEMAND

Load translaltions for each language ON DEMAND 3 weeks 2 days ago #3272

Hi !

Is there any way to load the translations for each language on demand instead of keeping all in the local storage ?

I mean, suppose the language of the device in English and the user switches to French, that would mean loading the French terms from the "cloud" removing the English ones. If the user later decides to switch to a different one, right the same process.

Our app will be translated to several languages so the idea is to optimize storage.
Any help will be appreciated.
Thanks,
Regards,
Nelson
The administrator has disabled public write access.

Load translaltions for each language ON DEMAND 3 weeks 1 day ago #3274

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1139
  • Thank you received: 243
  • Karma: 72
Hi,
If you need to load the translations from the cloud, you can do that by using AssetBundles.

Instead of having all your localization in I2Languages.prefab, create a copy of that prefab for each Language and add them to different bundles.

Then, whenever you switch languages, download the bundle, and instantiate the LanguageSource into the scene. As far as the LanguageSource is enabled, your localize component will be able to use its translations.

Another way, is to create a CSV spreadsheet for each language and store them in your server.
Then, whenever you need to load the new language, just download it and call Import_CSV to add it to the I2Languages.prefab

An example of this can be found at:
inter-illusion.com/assets/I2Localization...portingaCSVfile.html
See the DownloadCSV function.

Hope that helps,
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
Time to create page: 0.171 seconds
Template by JoomlaShine