ScriptLocalization.Get can't find string

More
6 years 1 week ago #2841 by segmation
I2.Loc.ScriptLocalization.Get () can find all strings while in the Unity Editor, but return an empty string when running in a built exe. This only occurs for certain strings

(e.g.)
In Unity Editor:
I2.Loc.ScriptLocalization.Get("About/ERASE_WARNING_TITLE"); returns "title"

In built Win64 exe:
I2.Loc.ScriptLocalization.Get("About/ERASE_WARNING_TITLE"); returns ""

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

More
6 years 1 week ago #2842 by Frank
Hi,
That can be caused by one of several things:

1- Your language source is not loaded correctly.
If that term is not in I2Languages.prefab or if you instantiated that prefab in the scene. Then that term is only accessible whenever the LanguageSource is loaded in the scene.
If that's the case, its advisable to add all your terms to the I2Languages.prefab and not instantiate the prefab in the scene. I2 Localization will automatically load the prefab from the Resources folder.

2- Google live Synchronization is enabled but the spreadsheet is not up-to-date

When you link your LanguageSource with a Google Spreadsheet, at runtime the content of the spreadsheet is automatically downloaded and used.
If you added or modified terms in your I2Languages prefab, but didn't export those changes to the spreadsheet, then, whenever you run in the device, the new changes are discarded.
To avoid this problem either disable Google Live Synchronization (by setting its update frequency to NEVER), or update your spreadsheet by clicking the Export Replace button.

3- If you had a very old version of I2 Localization and recently updated to the new one, some cache files could be corrupted.
Try uninstalling the game from the device, and deploying again, so that the cache gets cleared.

More details here:
inter-illusion.com/forum/i2-localization...itor-and-device#2459

If neither of these suggestions fixes the issue, please, let me know a bit more about your setup, what version of unity and I2 Localization are you using, Is the term returning empty for all languages or does it work for some? That may help me figure out what can be wrong.

BTW, today v2.8.4 was released in the store, try updating to that version and see if the problem continues.
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.

More
6 years 1 week ago #2843 by segmation
Thanks for the quick and detailed reply. #2-Google Live Synchronization was indeed on and causing the recently added strings not to be found.

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

Time to create page: 0.184 seconds
Template by JoomlaShine