Now with Partition Management

    This package has been deprecated

    Author message:

    Renamed to current-locale

    current_locale

    1.0.2 • Public • Published

    current_locale

    What

    A simple function which returns current locale.

    How

    Call it using getUserLanguage(options), where options - is an optional object.

    Options?

    It has two options:

    • supportedLocales is an array of supported locales. If it is passed and the browser locale is not one of them, then the function will return false.
    • fallbackLocale is a name of a locale which should be returned if browser locale is not one of supportedLocales.

    Browser support

    All modern browsers and even some IEs.

    Testing

    Test it with this command: $ mocha

    Install

    npm i current_locale

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • cbrwizard