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

internationalization

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

internationalization

i18n

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

internationalization

setup

i18n = require('internationalization');

app.use(i18n.middleware({
    directory: path.join(__dirname, 'locales')
}));

directory layout

locales
├── en
│   └── index.ini
└── zh
    └── index.ini

usage

span= _("Hello {username}", {username: username})
span= _("Hello {1}", username)
input(placeholder=_("Password") type="password")
Hello {username} = Guten Tag {username}
Hello {1} = Guten Tag {1}
Password = Passwort

generate/update language files(TBD)

directory: 'locales'
views: 'views/**.jade'

grunt i18n will scan the view direcotry for _() and __()

$ grunt i18n de

Keywords

FAQs

Package last updated on 28 Nov 2014

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