@jwaterfaucett/browser_langauge

0.0.2 • Public • Published

Browser Language

This library provides a succint way to get the user's preferred language if at all possible.

It will clean up the returned language locale to meet a 2char lowercased iso standard i.e. ES-AR will become es.

const DEFAULT = "en";

const locale = getPreferredLanguage(DEFAULT);

Readme

Keywords

none

Package Sidebar

Install

npm i @jwaterfaucett/browser_langauge

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jwaterfaucett