Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acryps/language

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acryps/language

Translations made easy, languages based on ISO 639.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
3
Weekly downloads
 
Created
Source

acryps language

Translations made easy, languages based on ISO 639.

'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!

Another handy property found on all languages is the natural writing direction:

document.documentElement.dir = Language.active.direction;

FAQs

Package last updated on 19 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc