From 56ad4932db7fcf58950d93532022581880692847 Mon Sep 17 00:00:00 2001 From: Danny Gleckler Date: Mon, 26 Aug 2024 11:54:18 -0400 Subject: [PATCH] feat: Add locale direction (#192) --- lib/common.js | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/common.js b/lib/common.js index bd40f7d..cfd2e4d 100644 --- a/lib/common.js +++ b/lib/common.js @@ -2,28 +2,28 @@ export const defaultLocale = 'en'; export const supportedBaseLocales = ['ar', 'cy', 'da', 'de', 'en', 'es', 'fr', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'tr', 'zh']; export const supportedLangpacks = ['ar', 'cy', 'da', 'de', 'en', 'en-gb', 'es', 'es-es', 'fr', 'fr-fr', 'fr-on', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'tr', 'zh-cn', 'zh-tw']; export const supportedLocalesDetails = [ - { code: 'ar-sa', name: 'العربية (المملكة العربية السعودية)' }, - { code: 'cy-gb', name: 'Cymraeg (Y Deyrnas Unedig)' }, - { code: 'da-dk', name: 'Dansk (danmark)' }, - { code: 'de-de', name: 'Deutsch (Deutschland)' }, - { code: 'en-ca', name: 'English (Canada)' }, - { code: 'en-gb', name: 'English (United Kingdom)' }, - { code: 'en-us', name: 'English (United States)' }, - { code: 'es-es', name: 'Español (España)' }, - { code: 'es-mx', name: 'Español (Latinoamérica)' }, - { code: 'fr-ca', name: 'Français (Canada)' }, - { code: 'fr-fr', name: 'Français (France)' }, - { code: 'fr-on', name: 'Français (Ontario)' }, - { code: 'hi-in', name: 'हिंदी (भारत)' }, - { code: 'ja-jp', name: '日本語 (日本)' }, - { code: 'ko-kr', name: '한국어 (대한민국)' }, - { code: 'mi-nz', name: 'Māori (Aotearoa)' }, - { code: 'nl-nl', name: 'Nederlands (Nederland)' }, - { code: 'pt-br', name: 'Português (Brasil)' }, - { code: 'sv-se', name: 'Svenska (Sverige)' }, - { code: 'tr-tr', name: 'Türkçe (Türkiye)' }, - { code: 'zh-cn', name: '中文(简体)' }, - { code: 'zh-tw', name: '中文(繁体)' } + { code: 'ar-sa', dir: 'rtl', name: 'العربية (المملكة العربية السعودية)' }, + { code: 'cy-gb', dir: 'ltr', name: 'Cymraeg (Y Deyrnas Unedig)' }, + { code: 'da-dk', dir: 'ltr', name: 'Dansk (danmark)' }, + { code: 'de-de', dir: 'ltr', name: 'Deutsch (Deutschland)' }, + { code: 'en-ca', dir: 'ltr', name: 'English (Canada)' }, + { code: 'en-gb', dir: 'ltr', name: 'English (United Kingdom)' }, + { code: 'en-us', dir: 'ltr', name: 'English (United States)' }, + { code: 'es-es', dir: 'ltr', name: 'Español (España)' }, + { code: 'es-mx', dir: 'ltr', name: 'Español (Latinoamérica)' }, + { code: 'fr-ca', dir: 'ltr', name: 'Français (Canada)' }, + { code: 'fr-fr', dir: 'ltr', name: 'Français (France)' }, + { code: 'fr-on', dir: 'ltr', name: 'Français (Ontario)' }, + { code: 'hi-in', dir: 'ltr', name: 'हिंदी (भारत)' }, + { code: 'ja-jp', dir: 'ltr', name: '日本語 (日本)' }, + { code: 'ko-kr', dir: 'ltr', name: '한국어 (대한민국)' }, + { code: 'mi-nz', dir: 'ltr', name: 'Māori (Aotearoa)' }, + { code: 'nl-nl', dir: 'ltr', name: 'Nederlands (Nederland)' }, + { code: 'pt-br', dir: 'ltr', name: 'Português (Brasil)' }, + { code: 'sv-se', dir: 'ltr', name: 'Svenska (Sverige)' }, + { code: 'tr-tr', dir: 'ltr', name: 'Türkçe (Türkiye)' }, + { code: 'zh-cn', dir: 'ltr', name: '中文(简体)' }, + { code: 'zh-tw', dir: 'ltr', name: '中文(繁体)' } ]; export const supportedLocales = supportedLocalesDetails.map((l) => l.code);