Necesito Programar Más

    rtl-detect
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/rtl-detect package

    1.0.4 • Public • Published

    rtl-detect

    Build Status

    This library will help you to detect if the locale is right-to-left language or not.

    Usage

    require rtl-detect lib

    var rtlDetect = require('rtl-detect');

    isRtlLang

    This function will check if the locale is right-to-left language or not.

    Examples:

    var isRtl = rtlDetect.isRtlLang('ar-JO');
    // isRtl will be true
    var isRtl = rtlDetect.isRtlLang('ar_JO');
    // isRtl will be true
    var isRtl = rtlDetect.isRtlLang('ar');
    // isRtl will be true
    var isRtl = rtlDetect.isRtlLang('en-US');
    // isRtl will be false

    getLangDir

    This function will get language direction for the locale.

    Examples:

    var langDir = rtlDetect.getLangDir('ar-JO');
    // langDir will be 'rtl'
    var langDir = rtlDetect.getLangDir('ar_JO');
    // langDir will be 'rtl'
    var langDir = rtlDetect.getLangDir('ar');
    // langDir will be 'rtl'
    var langDir = rtlDetect.getLangDir('en-US');
    // langDir will be 'ltr'

    Copyright 2015, Yahoo! Inc.

    Install

    npm i rtl-detect

    DownloadsWeekly Downloads

    186,066

    Version

    1.0.4

    License

    BSD-3-Clause

    Unpacked Size

    22.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • shadiabuhilal