@@ -13,26 +13,26 @@ interface LocaleObjectData extends LocaleObject {
1313}
1414
1515export const countryLocaleVariants : Record < string , ( LocaleObjectData & { country ?: boolean } ) [ ] > = {
16- /* ar: [
17- // ar.json contains ar-EG translations
18- // { code: 'ar-DZ', name: 'Arabic (Algeria)' },
19- // { code: 'ar-BH', name: 'Arabic (Bahrain)' },
20- { country: true, code: 'ar-EG', name: 'العربية' },
21- // { code: 'ar-EG', name: 'Arabic (Egypt)' },
22- // { code: 'ar-IQ', name: 'Arabic (Iraq)' },
23- // { code: 'ar-JO', name: 'Arabic (Jordan)' },
24- // { code: 'ar-KW', name: 'Arabic (Kuwait)' },
25- // { code: 'ar-LB', name: 'Arabic (Lebanon)' },
26- // { code: 'ar-LY', name: 'Arabic (Libya)' },
27- // { code: 'ar-MA', name: 'Arabic (Morocco)' },
28- // { code: 'ar-OM', name: 'Arabic (Oman)' },
29- // { code: 'ar-QA', name: 'Arabic (Qatar)' },
30- // { code: 'ar-SA', name: 'Arabic (Saudi Arabia)' },
31- // { code: 'ar-SY', name: 'Arabic (Syria)' },
32- // { code: 'ar-TN', name: 'Arabic (Tunisia)' },
33- // { code: 'ar-AE', name: 'Arabic (U.A.E.)' },
34- // { code: 'ar-YE', name: 'Arabic (Yemen)' },
35- ],*/
16+ ar : [
17+ // ar.json contains ar-EG translations
18+ // { code: 'ar-DZ', name: 'Arabic (Algeria)' },
19+ // { code: 'ar-BH', name: 'Arabic (Bahrain)' },
20+ { country : true , code : 'ar-EG' , name : 'العربية' } ,
21+ // { code: 'ar-EG', name: 'Arabic (Egypt)' },
22+ // { code: 'ar-IQ', name: 'Arabic (Iraq)' },
23+ // { code: 'ar-JO', name: 'Arabic (Jordan)' },
24+ // { code: 'ar-KW', name: 'Arabic (Kuwait)' },
25+ // { code: 'ar-LB', name: 'Arabic (Lebanon)' },
26+ // { code: 'ar-LY', name: 'Arabic (Libya)' },
27+ // { code: 'ar-MA', name: 'Arabic (Morocco)' },
28+ // { code: 'ar-OM', name: 'Arabic (Oman)' },
29+ // { code: 'ar-QA', name: 'Arabic (Qatar)' },
30+ // { code: 'ar-SA', name: 'Arabic (Saudi Arabia)' },
31+ // { code: 'ar-SY', name: 'Arabic (Syria)' },
32+ // { code: 'ar-TN', name: 'Arabic (Tunisia)' },
33+ // { code: 'ar-AE', name: 'Arabic (U.A.E.)' },
34+ // { code: 'ar-YE', name: 'Arabic (Yemen)' },
35+ ] ,
3636 en : [
3737 // en.json contains en-US translations
3838 { country : true , code : 'en-US' , name : 'English (US)' } ,
@@ -84,47 +84,46 @@ const locales: (Omit<LocaleObjectData, 'code'> & { code: string })[] = [
8484 file : 'en.json' ,
8585 name : 'English' ,
8686 } ,
87+ {
88+ code : 'ar-EG' ,
89+ file : 'ar.json' ,
90+ name : 'العربية' ,
91+ dir : 'rtl' ,
92+ pluralRule : ( choice : number ) => {
93+ const name = new Intl . PluralRules ( 'ar-EG' ) . select ( choice )
94+ return { zero : 0 , one : 1 , two : 2 , few : 3 , many : 4 , other : 5 } [ name ]
95+ } ,
96+ } satisfies LocaleObjectData ,
8797 /*{
88- code: 'ar',
89- file: 'ar.json',
90- name: 'العربية',
91- dir: 'rtl',
92- pluralRule: (choice: number) => {
93- const name = new Intl.PluralRules('ar-EG').select(choice)
94- return { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }[name]
95- },
96- } satisfies LocaleObjectData,
97- {
98- code: 'ckb',
99- file: 'ckb.json',
100- name: 'کوردیی ناوەندی',
101- dir: 'rtl',
102- pluralRule: (choice: number) => {
103- const name = new Intl.PluralRules('ckb').select(choice)
104- return { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }[name]
105- },
106- } satisfies LocaleObjectData,
107- {
108- code: 'fa-IR',
109- file: 'fa-IR.json',
110- name: 'فارسی',
111- dir: 'rtl',
112- pluralRule: (choice: number) => {
113- const name = new Intl.PluralRules('fa-IR').select(choice)
114- return { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }[name]
115- },
116- } satisfies LocaleObjectData,
117- {
118- code: 'ca',
119- file: 'ca.json',
120- name: 'Català',
98+ code: 'ckb',
99+ file: 'ckb.json',
100+ name: 'کوردیی ناوەندی',
101+ dir: 'rtl',
102+ pluralRule: (choice: number) => {
103+ const name = new Intl.PluralRules('ckb').select(choice)
104+ return { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }[name]
121105 },
122- {
123- code: 'el-GR',
124- file: 'el-GR.json',
125- name: 'Ελληνικά',
106+ } satisfies LocaleObjectData,
107+ {
108+ code: 'fa-IR',
109+ file: 'fa-IR.json',
110+ name: 'فارسی',
111+ dir: 'rtl',
112+ pluralRule: (choice: number) => {
113+ const name = new Intl.PluralRules('fa-IR').select(choice)
114+ return { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }[name]
126115 },
127- */
116+ } satisfies LocaleObjectData,
117+ {
118+ code: 'ca',
119+ file: 'ca.json',
120+ name: 'Català',
121+ },
122+ {
123+ code: 'el-GR',
124+ file: 'el-GR.json',
125+ name: 'Ελληνικά',
126+ },*/
128127 {
129128 code : 'de-DE' ,
130129 file : 'de-DE.json' ,
0 commit comments