@acryps/language
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

acryps language

Translations made easy.

'Hello World'
	.german('Hallo Welt')
	.italian('Ciao mondo')
	.greek('Γεια σου κόσμε')
	.japanese('ハローワールド')

Just make sure to set the active language before the strings are resolved

import { Language, languages } from '@acryps/language';

Language.active = languages.german;

const count = 3;
console.log(
	`${count} items in the cart`
		.german(`Warenkorb: ${count} Stück`)
) // → Warenkorb: 3 Stück

Can be used in the browser and server-side!

Readme

Keywords

none

Package Sidebar

Install

npm i @acryps/language

Weekly Downloads

8

Version

0.0.3

License

none

Unpacked Size

129 kB

Total Files

15

Last publish

Collaborators

  • levvij
  • eggsecuter
  • acryps-admin