Socket
Socket
Sign inDemoInstall

lcid

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lcid

Mapping between standard locale identifiers and Windows locale identifiers (LCID)


Version published
Weekly downloads
5.2M
decreased by-2.46%
Maintainers
1
Install size
9.32 kB
Created
Weekly downloads
 

Package description

What is lcid?

The 'lcid' npm package is used to map between standard locale identifiers and Windows locale identifiers (LCID). This is particularly useful when working with various Windows API that require LCID, or when integrating with systems that use Windows locale settings.

What are lcid's main functionalities?

Mapping from locale to LCID

This feature allows you to convert a standard locale string to its corresponding Windows LCID. Useful for applications that need to interface with Windows APIs expecting locale identifiers in LCID format.

const lcid = require('lcid');

console.log(lcid.from('en_US')); // Outputs: 1033

Mapping from LCID to locale

This feature enables the conversion from a Windows LCID back to a standard locale string. It's beneficial when you receive LCID from Windows systems and need to use standard locale formats in your application.

const lcid = require('lcid');

console.log(lcid.to(1033)); // Outputs: 'en_US'

Other packages similar to lcid

Readme

Source

lcid Build Status

Mapping between standard locale identifiers and Windows locale identifiers (LCID)

Based on the mapping used in the Python standard library.

The mapping itself is just a JSON file and can be used wherever.

Install

$ npm install --save lcid

Usage

var lcid = require('lcid');

lcid.from(1044);
//=> 'nb_NO'

lcid.to('nb_NO');
//=> 1044

lcid.all;
//=> {'af_ZA': 1078, ...}

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 16 Mar 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc