Google Live Synchronization

Once a Google Spreadsheet is linked to a Language Source, I2 Localization can be set to automatically detect whenever the Spreadsheet changes and download the translations.

This is a video showing how it works and how to setup the Spreadsheets:

Youtube: Google Live Synchronization

To enable Google Live Synchronization, open the Spreadsheet Tab in the Language Source and select Google.

After the spreadsheet name popup, there are options to define the update frequency and the loading delay.

Auto Update Frequency

When Update Frequency is NEVER, this feature is disabled and the game will always use the localization that was built into the game (everything that was in the LanguageSource at the moment the game was built).

Update Frequency, can also be set to ALWAYS so that it contacts Google every time the game is opened to see if the Spreadsheet has changed.

However, if you game gets to have a high number of monthly players, contacting Google every single time the app is opened (could be several times a day) will consume too much bandwidth whenever the Spreadsheet changes. Even when Google allows using that bandwidth, it can flag your spreadsheet and even temporally disable it. Also, most users will not want the extra Internet request every time they open the game.

To avoid that, Update Frequency can be set to not run always. You can set DAILY, WEEKLY, MONTHLY.

By default the frequency is set to ALWAYS but it could be a changed to DAILY as the player audience grows which make the game only contact Google once a day even if the game is opened several times during the day. As your game gets even more players, it could be a good idea to change it to WEEKLY. The only drawback of spreading the Google checks, is that if you make a change, it could take up to a week for the games to contact google and realize there is a new change in the Spreadsheet.

For more control over when the Spreadsheets are checked, you can set the Update Frequency to NEVER and then trigger the update by code:



Whenever a new Spreadsheet is downloaded, the plugin needs to load its data into the internal localization structures and update the translation of all enabled Texts/Sprites. This causes a small pause in the game that could because really noticeable as your spreadsheets grow and your UI become more complex. And it becomes specially bad when it happens on the startup while the game is playing intro anims or requiring some action from the user.

To solve this issue, the plugin allows delaying the downloading for a few seconds. By default it waits 5 seconds, but this value can be changed to allow more time for intro animations.

Local Cache

Whenever a new Spreadsheet is downloaded, its content is saved in the PlayerPrefs to avoid having to re-download it every time the game is opened.

Also, the "last modification date" of the Spreadsheet is stored in the PlayerPrefs, and next time Google is checked, the date in the Spreadsheet is compared to this one to avoid downloading new data if it hasn't changed.

Warning Points

  • It could happen when testing the game locally and installing different version of it, that it keep using the value in the PlayerPrefs instead of using the one built into the game. When this happens, it can be solved by deleting the game from the device and re-installing it.

  • Downloading the spreadsheet doesn't happen when you are in the editor, only when playing the game in the devices. When playing in the editor, the local languageSource its supposed to be the most up-to-date so thats used instead.

Created with the Personal Edition of HelpNDoc: Qt Help documentation made easy