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

language-manager

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

language-manager

The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

language-manager

The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.

Install

$ npm i -g npm
$ npm i --save language-manager

Usage

/// Language Manager Reference
var LanguageManager = require('language-manager')

/// Test object
var l = new LanguageManager()
  // Resource Type format
  .setType(LanguageManager.ResourceType.Json)
  // Resource file folder
  .setPath('tests/resource')
  // Resource language code
  .setLang('en-us')

/// Expected test result
var expected = 'Language Manager'
/// Actual test result
var actual = l
  // Get resource item value string
  .Val('app.name')

// Test output
console.log(`${l.Lang} : ${actual}`)

en-us : Language Manager

/// Change language
l.setLang('tr-tr')

/// Expected test result
expected = 'Dil Yöneticisi'
/// Actual test result
actual = l
  // Get resource item value string
  .Val('app.name')

// Test output
console.log(`${l.Lang} : ${actual}`)

tr-tr : Dil Yöneticisi

Test

$ npm run test

Pipelines

Build Status

NPM

Keywords

FAQs

Package last updated on 28 Dec 2018

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