# localize-with-spreadsheet

> Create a localization file in Android or iOS format from a Google Spreadsheet

Latest version **0.2.1** (published 2013-11-06) · 0 weekly downloads

## Install

```sh
npm install localize-with-spreadsheet
pnpm add localize-with-spreadsheet
yarn add localize-with-spreadsheet
bun add localize-with-spreadsheet
```

## Health

**Score 0/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2013-11-06 |
| First published | 2013-03-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 127 |
| Author | Xavier Hainaux |
| Maintainers | xavierha |

## Links

- npm: https://www.npmjs.com/package/localize-with-spreadsheet
- Repository: https://github.com/xavierha/localize-with-spreadsheet
- Issues: https://github.com/xavierha/localize-with-spreadsheet/issues
- npm.io page: https://npm.io/package/localize-with-spreadsheet

## Dependencies (3)

- [q](https://npm.io/package/q.md) 0.9.2
- [mkpath](https://npm.io/package/mkpath.md) 0.1.0
- [google-spreadsheets](https://npm.io/package/google-spreadsheets.md) git://github.com/xavierha/node-google-spreadsheets.git

## Recent versions

- 0.2.1 (latest) — 2013-11-06
- 0.2.0 — 2013-11-06
- 0.1.11 — 2013-10-14
- 0.1.10 — 2013-10-11
- 0.1.9 — 2013-10-11
- 0.1.8 — 2013-10-11
- 0.1.7 — 2013-10-11
- 0.1.6 — 2013-06-26
- 0.1.4 — 2013-03-26
- 0.1.3 — 2013-03-21
- 0.1.2 — 2013-03-21
- 0.1.1 — 2013-03-21
- 0.1.0 — 2013-03-21

## README

# Convert a Google Spreadsheet to a localization file


## Installation
	npm install localize-with-spreadsheet

## Example
Given a Google Spreadsheet like this:  
![Spreadsheet example](https://github.com/xavierha/localize-with-spreadsheet/raw/master/doc/spreadsheet-example.png)

The tool fetch the spreadsheet and write the result to a file in the Android or iOS format:

![Result android](https://github.com/xavierha/localize-with-spreadsheet/raw/master/doc/result-android.png) ![Result iOS](https://github.com/xavierha/localize-with-spreadsheet/raw/master/doc/result-ios.png)

Create a file update-localization.js

	var Localize = require("localize-with-spreadsheet");
    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" });

Run it with

    node update-localization.js

## Advanced
You can filter the worksheets to include with the second parameter of 'fromGoogleSpreadsheet'
Ex:

    Localize.fromGoogleSpreadsheet("<Key>", '*');
    Localize.fromGoogleSpreadsheet("<Key>", ['HomeScreen, 'ContactScreen']);
    Localize.fromGoogleSpreadsheet("<Key>", [0, 2]);

## Notes
- The script will preserve everything that is above the tags: < !-- AUTO-GENERATED --> or // AUTO-GENERATED
- Your spreadsheet should be "Published" for this to work
- You need to have git installed for the installation

---
_Source: https://npm.io/package/localize-with-spreadsheet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
