# @andreazorzi/textarealocalizer

> Transform your simple textarea into a localizable one

Latest version **1.0.13** (published 2025-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @andreazorzi/textarealocalizer
pnpm add @andreazorzi/textarealocalizer
yarn add @andreazorzi/textarealocalizer
bun add @andreazorzi/textarealocalizer
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2025-12-09 |
| First published | 2023-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 134.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrea Zorzi |
| Maintainers | andreazorzi |
| Keywords | textarea, localizer, localization, input |

## Links

- npm: https://www.npmjs.com/package/@andreazorzi/textarealocalizer
- Repository: https://github.com/andreazorzi/TextareaLocalizer
- Homepage: https://github.com/andreazorzi/TextareaLocalizer#readme
- Issues: https://github.com/andreazorzi/TextareaLocalizer/issues
- npm.io page: https://npm.io/package/@andreazorzi/textarealocalizer

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.13 (latest) — 2025-12-09
- 1.0.12 — 2025-12-05
- 1.0.11 — 2025-12-05
- 1.0.10 — 2025-04-04
- 1.0.9 — 2025-03-07
- 1.0.8 — 2025-03-05
- 1.0.7 — 2024-10-16
- 1.0.6 — 2024-10-16
- 1.0.5 — 2024-10-15
- 1.0.4 — 2023-09-11
- 1.0.3 — 2023-09-11
- 1.0.2 — 2023-08-25
- 1.0.1 — 2023-08-25
- 1.0.0 — 2023-08-25

## README

# TextareaLocalizer
Transform your simple textarea into a localizable one.

## Install
```bash
npm i @andreazorzi/textarealocalizer
```

## Usage
### app.js
```javascript
// TextareaLocalizer
import TextareaLocalizer from "@andreazorzi/textarealocalizer";
window.TextareaLocalizer = TextareaLocalizer;
```

### app.css
```css
@import "@andreazorzi/textarealocalizer/textarea-localizer.css";
```

### HTML
```html
<textarea id="textarea"></textarea>

<script>
    let options = {
        "it": "Ciao", 
        "en": "Hello", 
        "de": "Hallo",
    }
    let textarea = new TextareaLocalizer("#textarea", options)
</script>
```

## Options List
```
{
    default_language: null, // Set the language to show by default
    texts: { // Set the texts, the keys are the available languages
        "it": "", 
        "en": "", 
        "de": "",
        "fr": "",
        "ru": "",
        "at": "",
        "ch": "",
        "es": "",
        "ie": "",
    },
    languages_icons: {
        "it": "path/to/asset.png"
    },
    custom_classes: { // Set the custom classes for each elements
        textarea: "",
    }
}
```

## Methods
```js
// Get all plugin languages
getAllLanguages()

// Get available languages
getLanguages()

// Switch language
changeLanguage(lang)

// Get all languages values
getValues()

// Get the value of a single language
getValue(lang)
```

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