frau-locale-provider v1.8.0
frau-locale-provider
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 falseContributing
Contributions are welcome, please submit a pull request!
Versioning and Releasing
This repo is configured to use semantic-release. Commits prefixed with fix: and feat: will trigger patch and minor releases when merged to main.
To learn how to create major releases and release from maintenance branches, refer to the semantic-release GitHub Action documentation.
10 months ago
2 years ago
2 years ago
4 years ago
5 years ago
5 years ago
8 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago