New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aurium/i18n

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurium/i18n

Internationalization made simple

  • 0.0.4
  • Source
  • npm
  • Socket score

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

Internationalization made Simple

The focus of this project is to make the i18n call to look simple, clean and obvious.

Instaling

npm install @aurium/i18n

Usage

var l10nData = {
  en: {
    some_string: 'Some string.',
    has_n_aples: ['There is one apple.', 'There are {num} apples.']
  },
  pt_br: {
    some_string: 'Algum texto.',
    has_n_aples: ['Existe uma maçã.', 'Existem {num} maçãs.']
  }
}

const i18nBuilder = require('@aurium/i18n')
var i18n = i18nBuilder(l10nData, ['pt-Br', 'es'])

console.log('>> '+ i18n.some_string)
console.log('>> '+ i18n.has_n_aples.plural(5))

Extracting i18n keys from source code

This package provides the extract-i18n-keys cli, that can find for keys like i18n.some_string and add this to l10n files. You can run this command to add each new key you just write to the l10n files, without change current ones.

extract-i18n-keys can write js file modules with ocurrences information, or clean json files. You can also change your proxy var name from i18n to any other and use the -p|--i18n-proxy-name parameter to inform that.

For more details, read extract-i18n-keys --help.

Hacking and Contributing

Please, read the contributing page.

Keywords

FAQs

Package last updated on 16 Apr 2020

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