# translocalizer

> Localize your application in seconds

Latest version **3.0.1** (published 2019-12-11) · MIT license · 0 weekly downloads

## Install

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

Provides the command `translocalizer`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2019-12-11 |
| First published | 2019-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 179 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Arno Hovhannisyan |
| Maintainers | arnohovhannisyan |

## Links

- npm: https://www.npmjs.com/package/translocalizer
- Repository: https://github.com/arnohovhannisyan/translocalizer
- Homepage: https://github.com/arnohovhannisyan/translocalizer#readme
- Issues: https://github.com/arnohovhannisyan/translocalizer/issues
- npm.io page: https://npm.io/package/translocalizer

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [commander](https://npm.io/package/commander.md) ^4.0.1

## Recent versions

- 3.0.1 (latest) — 2019-12-11
- 3.0.0 — 2019-09-13
- 2.1.0 — 2019-09-12
- 2.0.1 — 2019-09-06
- 2.0.0 — 2019-09-04
- 1.2.0 — 2019-08-24
- 1.1.1 — 2019-08-24
- 1.1.0 — 2019-08-24
- 1.0.2 — 2019-08-24
- 1.0.1 — 2019-08-24
- 1.0.0 — 2019-08-24

## README

# Translocalizer

[![Travis][travisimg]][travislink]
[![Version][versionimg]][versionlink]
[![Issues][issuesimg]][issueslink]
[![License][licenseimg]][licenselink]
![Dependencies][dependenciesimg]

Translocalizer is a tool for localizing your application in seconds.

## Available Languages

Translocalizer uses Yandex Translate under the hood, so check [this page][languages] for the list of available languages.

## Installation

Yarn:

```console
$ yarn add -D translocalizer
```

NPM:

```console
$ npm install -D translocalizer
```

## Usage

To use `Translocalizer`, you will need a Yandex Translate API key, which you can obtain [here][apikey]. Create a new key for every project since using a certain key too many times in succession can lead to rate limiting.

### Using the CLI

```json
// translocalizer.json

{
  "basePath": "i18n",
  "srcFile": "en.json",
  "filenameTemplate": "*.json",
  "languages": ["fr", "it"],
  "apiKey": "trnsl.1.1..."
}
```

```console
$ translocalizer [options]
```

To see all available options, run this command:

```console
$ translocalizer --help
```

### Using the API

```ts
import { Translocalizer } from "translocalizer";

const config = {
  basePath: "i18n",
  srcFile: "en.json",
  filenameTemplate: "*.json",
  languages: ["fr", "it"],
  apiKey: "trnsl.1.1..."
};

Translocalizer.localize(config);
```

<!-- Documentation -->

[apikey]: https://translate.yandex.com/developers/keys
[languages]: https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/#api-overview__languages

<!-- Badge links -->

[travislink]: https://travis-ci.com/arnohovhannisyan/translocalizer
[versionlink]: https://npmjs.com/package/translocalizer
[issueslink]: https://github.com/arnohovhannisyan/translocalizer/issues
[licenselink]: https://github.com/arnohovhannisyan/translocalizer/blob/master/LICENSE

<!-- Image links -->

[travisimg]: https://img.shields.io/travis/com/arnohovhannisyan/translocalizer
[versionimg]: https://img.shields.io/npm/v/translocalizer
[issuesimg]: https://img.shields.io/github/issues/arnohovhannisyan/translocalizer.svg
[licenseimg]: https://img.shields.io/npm/l/translocalizer
[dependenciesimg]: https://img.shields.io/david/arnohovhannisyan/translocalizer

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