GithubHelp home page GithubHelp logo

ppaskaris-d2l / frau-locale-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brightspace/frau-locale-provider

0.0 0.0 0.0 47 KB

Free range app utility for providing information about the current user's locale within the ILP

License: Apache License 2.0

JavaScript 100.00%

frau-locale-provider's Introduction

frau-locale-provider

NPM version Build status Coverage Status

frau-locale-provider is a utility that you can use in your D2L free range applications (frau) in order to get information about the locale of the current user.

To install via NPM:

npm install frau-locale-provider

API

getLangTag()

Gets the current user's language tag, as defined in RFC 5646. This consists of a primary language subtag (e.g. "en", "fr") and an optional region subtag, separated by a hyphen (e.g. "en-US", "fr-CA").

var localeProvider = require('frau-locale-provider');

var langTag = localeProvider.getLangTag();
console.log(langTag); // -> e.g. "en-GB"

isRtl()

Used to determine if the current user's locale requires that text be written in the right to left (RTL) direction.

var localeProvider = require('frau-locale-provider');

var isRtl = localeProvider.isRtl();
console.log(isRtl); // -> true or false

Contributing

Contributions are welcome, please submit a pull request!

Code Style

This repository is configured with EditorConfig rules and contributions should make use of them.

frau-locale-provider's People

Contributors

dlockhart avatar dbatiste avatar omsmith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.