# inst-tinymce-locales

> Handles TinyMCE locales and locale mappings.

Latest version **0.7.0** (published 2019-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install inst-tinymce-locales
pnpm add inst-tinymce-locales
yarn add inst-tinymce-locales
bun add inst-tinymce-locales
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2019-07-08 |
| First published | 2019-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 270 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | spencerolson |
| Keywords | inst, instructure, tinmyce, locales |

## Links

- npm: https://www.npmjs.com/package/inst-tinymce-locales
- Repository: https://github.com/spencerolson/inst-tinymce-locales
- Homepage: https://github.com/spencerolson/inst-tinymce-locales#readme
- Issues: https://github.com/spencerolson/inst-tinymce-locales/issues
- npm.io page: https://npm.io/package/inst-tinymce-locales

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.7.0 (latest) — 2019-07-08
- 0.6.0 — 2019-07-08
- 0.5.0 — 2019-07-08
- 0.4.0 — 2019-07-08
- 0.3.0 — 2019-07-08
- 0.2.0 — 2019-07-08
- 0.1.0 — 2019-07-08

## README

# inst-tinymce-locales

![npm](https://img.shields.io/npm/v/inst-tinymce-locales.svg)

Exposes a `fetchTranslations` function that takes a language code (required) and custom
language code mappings (optional), and returns an object with translations (if
translations for that language are supported) or `undefined` (if translations
for that language are not supported). Returned translation objects will have two keys:
`languageCode` and `content`. `languageCode` refers to the TinyMCE language code for the
translations, and `content` contains all translations. 

```
const { fetchTranslations } = require('inst-tinymce-locales')
fetchTranslations('ru') // returns a translations object
fetchTranslations('myCustomLanguage') // returns undefined
fetchTranslations('myCustomLanguage', { myCustomLanguage: 'ru' }) // returns a translations object
```

Once translations are fetched, one will typically want to load them in their tinymce instance:

```
translations = fetchTranslations('de')
tinymce.addI18n(translations.languageCode, translations.content)
```

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