# translatron

> split multi-language html into per-language files

Latest version **0.1.0** (published 2017-04-25) · Unlicense OR 1=1; DROP DATABASE spdx -- license · 0 weekly downloads

## Install

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

Provides the command `translatron`.

## 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.1.0 |
| Published | 2017-04-25 |
| First published | 2017-04-25 |
| Weekly downloads | 0 |
| License | Unlicense OR 1=1; DROP DATABASE spdx -- |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yetzt |
| Maintainers | yetzt |
| Keywords | html, i18n, language |

## Links

- npm: https://www.npmjs.com/package/translatron
- npm.io page: https://npm.io/package/translatron

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.6.4
- [cheerio](https://npm.io/package/cheerio.md) ^0.22.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2017-04-25

## README

# Translatron

Use different languages directly in your `<html>` code and let translatron make the versions for each language.

Specify the available languages in the `<html>` tags `lang` attribute. use the `l` attribute to mark a tag as specific for this language.

## Example

```html
<html lang="en,de">
	<head>
		<title l="en">The Title</title>
		<title l="de">Der Titel</title>
	</head>
	<body>
		<p>
			<lang l="en">English content</lang>
			<lang l="de">Deutscher Inhalt</lang>
		</p>
	</body>
</html>
```

`translatron -l de -l en test.html test.*.html`

This will generate the files `test.de.html` and `test.en.html` containing

```html
<html lang="en">
	<head>
		<title>The Title</title>
	</head>
	<body>
		<p>
			English content
		</p>
	</body>
</html>
```
and 

```html
<html lang="de">
	<head>
		<title>Der Titel</title>
	</head>
	<body>
		<p>
			Deutscher Inhalt
		</p>
	</body>
</html>
```

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