Socket
Book a DemoInstallSign in
Socket

i18n-pipe

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n-pipe

i18n for pipe separated translation strings

1.0.3
latest
npmnpm
Version published
Weekly downloads
36
9.09%
Maintainers
1
Weekly downloads
 
Created
Source

i18n pipe

This is a translation library for pipe separated translation strings such as "|en|Hi, my name is Matteo|it|Ciao, il mio nome è Matteo"

How to install

npm i i18n-pipe

How to import

import i18n from 'i18n-pipe';

How to use

get current language

i18n.language(); // returns 'en'

set current language

i18n.language('it'); // returns 'it'

translate a string

i18n.t("|en|Hi, my name is Matteo|it|Ciao, il mio nome è Matteo");
// returns "Ciao, il mio nome è Matteo"

FAQs

Package last updated on 30 May 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.