- Endpoint.gs is the code for the web endpoint you build in Google Apps Scripts. It takes a
locale=
parameter in the GET query and serves a combined json blob of k:v pairs from all sheets within the spreadsheet. - AppScript.json gives this the appropriate permissions
- LocalizationBuilder.cs adds a unity menu item that parallel executes requests for each locale, saving
<locale>.json
for each.
The assumed format for the localization sheets is:
key | en_US | fr_FR | ... | es_ES | translator notes or some other column |
---|---|---|---|---|---|
button.select | Select | Sélectionner | ... | Seleccione | It's a button label |
etc
Note AppScript.json is the low-security route (just a secret url) to avoid oauth stuff when pulling. There are other run-as and access restrictions you can set.
you can then deserialize the json using JsonUtility.FromJson<SerializedLocalization>(filename)
and build the entries into a real data structure like a dict.
it'd be real easy to change this to make it serve csv also if that's your thing.