Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[l10n] Add Arabic (ar_EG) locale #23006

Merged
merged 4 commits into from Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/pages/guides/localization/localization.md
Expand Up @@ -34,6 +34,7 @@ const theme = createMuiTheme(

| Locale | BCP 47 language tag | Import name |
| :---------------------- | :------------------ | :---------- |
| Arabic | ar-AR | `arAR` |
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
| Armenian | hy-AM | `hyAM` |
| Azerbaijani | az-AZ | `azAZ` |
| Bulgarian | bg-BG | `bgBG` |
Expand Down
50 changes: 50 additions & 0 deletions packages/material-ui/src/locale/index.ts
Expand Up @@ -29,6 +29,56 @@ export interface Localization {
};
}

export const arAR: Localization = {
props: {
MuiBreadcrumbs: {
expandText: 'إظهر العنوان',
},
MuiTablePagination: {
backIconButtonText: 'الصفحة السابقة',
labelRowsPerPage: 'عدد الصفوف في الصفحة:',
labelDisplayedRows: ({ from, to, count }) =>
`${from}-${to} من ${count !== -1 ? count : ` أكثر من${to}`}`,
nextIconButtonText: 'الصفحة التالية',
},
MuiRating: {
getLabelText: (value) => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`,
emptyLabelText: 'فارغ',
},
MuiAutocomplete: {
clearText: 'مسح',
closeText: 'إغلاق',
loadingText: 'يتم التحميل…',
noOptionsText: 'لا يوجد خيارات',
openText: 'فتح',
},
MuiAlert: {
closeText: 'إغلاق',
},
MuiPagination: {
'aria-label': 'التنقل عبر الصفحات',
getItemAriaLabel: (type, page, selected) => {
if (type === 'page') {
return `${selected ? '' : 'إذهب إلى '} صفحة ${page}`;
}
if (type === 'first') {
return 'إذهب الى الصفحة الأولى';
}
if (type === 'last') {
return 'إذهب الي الصفحة الأخيرة';
}
if (type === 'next') {
return 'إذهب الى الصفحة التالية';
}
if (type === 'previous') {
return 'إذهب الى الصفحة السابقة';
}
return undefined;
},
},
},
};

export const azAZ: Localization = {
components: {
MuiBreadcrumbs: {
Expand Down