All Projects → moimikey → Locale2

moimikey / Locale2

Licence: mit
💪 Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Locale2

Redux React I18n
An i18n solution for React/Redux and React Native projects
Stars: ✭ 64 (-1.54%)
Mutual labels:  i18n, localization, internationalization, l10n
Laravel Js Localization
🌐 Convert your Laravel messages and consume them in the front-end!
Stars: ✭ 451 (+593.85%)
Mutual labels:  i18n, localization, internationalization, l10n
lisan
🌈i18n, Reimagined! 🚀A blazing fast and super small i18n library for Javascript
Stars: ✭ 85 (+30.77%)
Mutual labels:  i18n, internationalization, localization, l10n
Mojito
An automation platform that enables continuous localization.
Stars: ✭ 256 (+293.85%)
Mutual labels:  i18n, localization, internationalization, l10n
Fluent.js
JavaScript implementation of Project Fluent
Stars: ✭ 622 (+856.92%)
Mutual labels:  i18n, localization, internationalization, l10n
stone.js
gettext-like client-side Javascript Internationalization Library
Stars: ✭ 20 (-69.23%)
Mutual labels:  i18n, internationalization, localization, l10n
i18n
Package i18n is for app Internationalization and Localization.
Stars: ✭ 79 (+21.54%)
Mutual labels:  i18n, internationalization, localization, l10n
msgtools
Tools for Developing Diagnostic Messages
Stars: ✭ 18 (-72.31%)
Mutual labels:  i18n, internationalization, localization, l10n
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (-53.85%)
Mutual labels:  i18n, internationalization, localization, l10n
inlang
Open Source Localization Solution for Software.
Stars: ✭ 160 (+146.15%)
Mutual labels:  i18n, internationalization, localization, l10n
I18N
I18N Library for .NET, and Delphi
Stars: ✭ 48 (-26.15%)
Mutual labels:  i18n, internationalization, localization, l10n
python-fluent
Python implementation of Project Fluent
Stars: ✭ 142 (+118.46%)
Mutual labels:  i18n, internationalization, localization, l10n
android-studio-plugin
Integrate your Android project with Crowdin
Stars: ✭ 52 (-20%)
Mutual labels:  i18n, internationalization, localization, l10n
labels
Bolt Labels extension - Translatable labels for Bolt
Stars: ✭ 18 (-72.31%)
Mutual labels:  i18n, internationalization, localization, l10n
figma-static-localizer
A Figma plugin for static localization
Stars: ✭ 30 (-53.85%)
Mutual labels:  i18n, internationalization, localization, l10n
cldr-engine
Internationalization and localization in Typescript with Unicode CLDR, batteries included
Stars: ✭ 34 (-47.69%)
Mutual labels:  i18n, unicode, internationalization, localization
React Native Globalize
Internationalization (i18n) for React Native
Stars: ✭ 246 (+278.46%)
Mutual labels:  i18n, localization, internationalization, l10n
awesome-i18n
🌍 A curated list of i18n resources for all kind of languages and frameworks
Stars: ✭ 205 (+215.38%)
Mutual labels:  i18n, internationalization, localization, l10n
i18n
internationalize projects to Arabic
Stars: ✭ 67 (+3.08%)
Mutual labels:  i18n, internationalization, localization, l10n
rosetta
A blazing fast internationalization (i18n) library for Crystal with compile-time key lookup.
Stars: ✭ 23 (-64.62%)
Mutual labels:  i18n, internationalization, localization, l10n

locale2 Build Status

Version Downloads Deps DevDeps

Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!

About Language Tags, Locale, RFC-5646 and BCP-47

In 2009, IETF published RFC-5646, "Tags for Identifying Languages," in which "...describes the structure, content, construction, and semantics of language tags for use in cases where it is desirable to indicate the language used in an information object."

A language tag is composed from a sequence of one or more "subtags", each of which refines or narrows the range of language identified by the overall tag. Subtags, in turn, are a sequence of alphanumeric characters (letters and digits), distinguished and separated from other subtags in a tag by a hyphen ("-", [Unicode] U+002D).

References:

  1. RFC-5646
  2. BCP-47

Unit tested and browser tested with BrowserStack

BrowserStack

Tested successfully on:

✓ IE 8 ✓ IE 9 ✓ IE 10 ✓ IE 11 ✓ IE 12 (Edge)

✓ Safari 5.1+

✓ Opera (Presto, Webkit, Blink)

✓ Firefox

✓ Chrome

Node support

$ babel-node
> import locale2 from 'locale2'
> locale2
en-US
>

...and pairs well with iso3166-1!

var iso3166 = require('iso3166-1')
var locale2 = require('locale2')
> iso3166.from(locale2).to3()
USA
>

Install

npm install --no-optional
npm test

Development

Browser testing (currently private)

npm run test:bs
npm run test:bs:local

Try it now

view on requirebin

License

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].