You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 826B

1234567891011121314151617181920212223242526272829303132333435
  1. # lcid [![Build Status](https://travis-ci.org/sindresorhus/lcid.svg?branch=master)](https://travis-ci.org/sindresorhus/lcid)
  2. > Mapping between [standard locale identifiers](http://en.wikipedia.org/wiki/Locale) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms)
  3. Based on the [mapping](https://github.com/python/cpython/blob/be2a1a76fa43bb1ea1b3577bb5bdd506a2e90e37/Lib/locale.py#L1395-L1604) used in the Python standard library.
  4. The mapping itself is just a [JSON file](lcid.json) and can be used wherever.
  5. ## Install
  6. ```
  7. $ npm install --save lcid
  8. ```
  9. ## Usage
  10. ```js
  11. var lcid = require('lcid');
  12. lcid.from(1044);
  13. //=> 'nb_NO'
  14. lcid.to('nb_NO');
  15. //=> 1044
  16. lcid.all;
  17. //=> {'af_ZA': 1078, ...}
  18. ```
  19. ## License
  20. MIT © [Sindre Sorhus](http://sindresorhus.com)