Load translaltions for each language ON DEMAND
- nelsonlarocca
- Topic Author
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
6 years 1 month ago #3272
by nelsonlarocca
Load translaltions for each language ON DEMAND was created by nelsonlarocca
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
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
Please Log in or Create an account to join the conversation.
6 years 1 month ago #3274
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Load translaltions for each language ON DEMAND
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
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
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds