New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

express-lang

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

express-lang

Transductor for ExpressJs

unpublished
latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

express-lang

System for lang

Install

$ npm install express-lang

Use

Config

var lang = require('express-lang');
app.use( new Lang( getLang, listLang, options));

Store

let getLang = (ListLangsForUser, callback) => {
	let codeLang = 'es';
	let jsonmsgid = {
		'translate' : [ 'tradicir', 'traducion', ... ],
		'number is %d' : [ 'El numero es %d' ]
	};
	callback( error, jsonmsgid, codeLang )
};

let listLang = (callback) => {
	let ArrayLangs = [ 'es', 'en' ];
	 callback( error, ArrayLangs );
};

Templates

p= t('translate')
p= t('number is %d', 10)

Render

<p>tradicir</p>
<p>El numero es 10</p>

Options

  • localte: The name of the function to translate
  • lang : The decfult languge
  • query : The query to change the language
  • errorSelect : The error when no have thats language
  • errorList : The error when no have the list

Keywords

express

FAQs

Package last updated on 21 Apr 2016

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