translatron

0.1.0 • Public • Published

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 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 lang="en">
	<head>
		<title>The Title</title>
	</head>
	<body>
		<p>
			English content
		</p>
	</body>
</html>

and

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0

Package Sidebar

Install

npm i translatron

Weekly Downloads

0

Version

0.1.0

License

Unlicense OR 1=1; DROP DATABASE spdx --

Last publish

Collaborators

  • yetzt