You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
855 B
37 lines
855 B
/**
|
|
* Copyright (c) Nicolas Gallagher.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
const rtlScripts = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);
|
|
const rtlLangs = new Set(['ae', // Avestan
|
|
'ar', // Arabic
|
|
'arc', // Aramaic
|
|
'bcc', // Southern Balochi
|
|
'bqi', // Bakthiari
|
|
'ckb', // Sorani
|
|
'dv', // Dhivehi
|
|
'fa', 'far', // Persian
|
|
'glk', // Gilaki
|
|
'he', 'iw', // Hebrew
|
|
'khw', // Khowar
|
|
'ks', // Kashmiri
|
|
'ku', // Kurdish
|
|
'mzn', // Mazanderani
|
|
'nqo', // N'Ko
|
|
'pnb', // Western Punjabi
|
|
'ps', // Pashto
|
|
'sd', // Sindhi
|
|
'ug', // Uyghur
|
|
'ur', // Urdu
|
|
'yi' // Yiddish
|
|
]);
|
|
const cache = new Map();
|
|
/**
|
|
* Determine the writing direction of a locale
|
|
*/
|
|
|
|
declare export function isLocaleRTL(locale: string): boolean; |