I2 asset out of Resources

More
7 months 4 weeks ago #3396 by stakira
We need a solution so that we can do live-patch / hotfix with Unity asset bundles. Google Sheet is not an option due to many reasons, for example, version control, and geo-location accessibility.

We have tried to use LanguageSource MonoBehavior on a prefab, and place an instance in every scene. Ended with unpleasant surprise. It seems some post-processing happened silently and texts are saved into every single scene, bloated our binary by a few hundred megabytes.

We have tried to put a second LanguageSourceAsset out of Resources. Was not able to figure out the proper initialization order.

Our issue with I2 Localization is it has been assuming too much and burying them deep everywhere, therefore difficult to customize with confidence.

Please help to provide us with some insights to deal with this situation.

Please Log in or Create an account to join the conversation.

More
7 months 4 weeks ago #3397 by Frank
Replied by Frank on topic I2 asset out of Resources
Hi,

and place an instance in every scene


I2 Localization stores the translations inside the LanguageSource Prefab or Asset. If you instantiate the prefab into the scene, then you are also copying all the values inside that prefab into the scene. So, its expected to add lots of texts into the scenes. Unity doesn't do a reference but actually copies prefab into scenes, and only "links" to the original prefab.

Thats why that method (LanguageSource inside the scene) is only advised when storing the terms that are used in that scene, and not all terms for every scene.

We have tried to put a second LanguageSourceAsset out of Resources. Was not able to figure out the proper initialization order.


You can have multiple LanguageSources. The plugin will automatically load all "Global Sources". These are defined inside the GlobalSources array in Assets\I2\Localization\Scripts\Manager\LocalizationManager_Sources.cs line 16

By default only the I2Languages source is referenced there. But if you have another named "MySecondSource.asset", you can do:
public static string[] GlobalSources = { "I2Languages", "MySecondSource" };

That will load the asset automatically on startup.

We need a solution so that we can do live-patch / hotfix with Unity asset bundles


If you want to manage sources by yourself, and store them in AssetBundles or download them from your own servers, you can always do:
 ... use WWW calls to download the bundle... or use the new Addressable system.....
 LanguageSource source  = .... get the source from the bundle
 LocalizationManager.AddSource( source );
 LocalizationManager.LocalizeAll(true);

That will add the source and make the Localize component to re-localize so that they use the data from the new source.
Please help to provide us with some insights to deal with this situation.

Another way to deal with updating localization from the servers (similar to the Google Live Synchronization) but without using google spreadsheets.
Is to store the updates as CSV files in your server and then in the code, download and apply the CSV into the Source[0]

Here is an example of how to do so:
inter-illusion.com/assets/I2Localization...portingaCSVfile.html

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.126 seconds
Template by JoomlaShine