Create a localization file in Android or iOS format from a Google Spreadsheet
Supports
1. iOS, Android, js,
2. file splits from inline comments (only supports android)
Right now only good for android XML files where there comments with xxxx.xml and they will be split automatically.
The tool fetch the spreadsheet and write the result to a file in the Android or iOS format:
Create a file update-localization.js
var Localize = require("localize-gsheet-pro");
var transformer = Localize.fromGoogleSpreadsheet("0Aq6WlQdq71FydDZlaWdmMEUtc2tUb1k2cHRBS2hzd2c", '*');
transformer.setKeyCol('KEY');
transformer.save("values/strings.xml", { valueCol: "NL", format: "android" });
transformer.save("values-fr/strings.xml", { valueCol: "FR", format: "android" });
transformer.save("nl.lproj/Localizable.strings", { valueCol: "NL", format: "ios" });
transformer.save("fr.lproj/Localizable.strings", { valueCol: "FR", format: "ios" });
transformer.save("values/strings.xml", { valueCol: "NL", format: "android" }, function(){
transformer.programSplit ("values/" + "strings.xml", "values", "ZH");
});
Run it with
node update-localization.js
Localize.fromGoogleSpreadsheet("
Localize.fromGoogleSpreadsheet("
Localize.fromGoogleSpreadsheet("