verdnatura-chat/app/i18n/isRTL.ts

5 lines
275 B
TypeScript

// https://github.com/zoontek/react-native-localize/blob/master/src/constants.ts#L5
const USES_RTL_LAYOUT = ['ar', 'ckb', 'fa', 'he', 'ks', 'lrc', 'mzn', 'ps', 'ug', 'ur', 'yi'];
export const isRTL = (locale?: string) => (locale ? USES_RTL_LAYOUT.includes(locale) : false);