# excel2lang

> Transforms a XLSX language file into JSON data

Latest version **1.0.3** (published 2021-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install excel2lang
pnpm add excel2lang
yarn add excel2lang
bun add excel2lang
```

Provides the command `excel2lang`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-12-14 |
| First published | 2019-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | PGM Solutions |
| Maintainers | willjouo |

## Links

- npm: https://www.npmjs.com/package/excel2lang
- Repository: https://github.com/pgmsolutions/excel2lang
- Homepage: http://www.pgm-solutions.com
- Issues: https://github.com/pgmsolutions/excel2lang/issues
- npm.io page: https://npm.io/package/excel2lang

## Dependencies (4)

- [xlsx](https://npm.io/package/xlsx.md) ^0.17.4
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.11
- [commander](https://npm.io/package/commander.md) ^8.3.0

## Recent versions

- 1.0.3 (latest) — 2021-12-14
- 1.0.2 — 2021-12-13
- 1.0.1 — 2019-01-05
- 1.0.0 — 2019-01-05

## README

# excel2lang

excel2lang is a small utility program which takes a xlsx file as an input and extracts the languages strings to a JSON format.
It has several cool features:
- Support comment lines
- Can create multiple files
- Use the first column as default if no value

## Installation

```
npm install -g excel2lang
```

## Usage

```
excel2lang input.xlsx
```

## xlsx format

Your excel must be like this:

| #   | Unique ID            | English | French       |
| --- | -------------------- | ------- | ------------ |
| C   | id                   | en      | fr           |
| F   | ./{lang}.json        |         |              |
| #   | Generic              |         |              |
|     | open                 | Open    | Ouvrir       |
|     | browse               | Browse  | Parcourir    |
|     | edit                 | Edit    | Modifier     |
|     | select               | Select  | Selectionner |
| F   | ./topbar/{lang}.json |         |              |
| #   | Topbar               |         |              |
|     | topbar/file          | File    | Fichier      |
|     | topbar/help          | Help    | Aide         |

The first column indicates what the line is for:

| Character | Description                                                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _nothing_ | Regular line of strings.                                                                                                                                            |
| C         | Code line, indicating the language code for each column.                                                                                                            |
| F         | The JSON file to create. Will include all lines until the end of the file or another _F_ line. The `{lang}` substring will be replace by the current language code. |
| #         | Comment line.                                                                                                                                                       |

In order to work, a _C_ line __MUST__ be the first line of the excel sheet (beside comment line). Also, a _F_ line __MUST__ be present before the first string line.

## TODO
- More checks for errors

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