diff --git a/docs/data/material/guides/localization/localization.md b/docs/data/material/guides/localization/localization.md index e7377f7527b690..8dfca3ee5e3cd5 100644 --- a/docs/data/material/guides/localization/localization.md +++ b/docs/data/material/guides/localization/localization.md @@ -40,6 +40,7 @@ const theme = createTheme( | :---------------------- | :------------------ | :---------- | | Amharic | am-ET | `amET` | | Arabic (Egypt) | ar-EG | `arEG` | +| Arabic (Saudi Arabia) | ar-SA | `arSA` | | Arabic (Sudan) | ar-SD | `arSD` | | Armenian | hy-AM | `hyAM` | | Azerbaijani | az-AZ | `azAZ` | diff --git a/packages/mui-material/src/locale/index.ts b/packages/mui-material/src/locale/index.ts index c88a9ff936da0a..8c3e85ea88c2da 100644 --- a/packages/mui-material/src/locale/index.ts +++ b/packages/mui-material/src/locale/index.ts @@ -170,6 +170,77 @@ export const arEG: Localization = { }, }; +export const arSA: Localization = { + components: { + MuiBreadcrumbs: { + defaultProps: { + expandText: 'إظهار المسار', + }, + }, + MuiTablePagination: { + defaultProps: { + getItemAriaLabel: (type) => { + if (type === 'first') { + return 'الانتقال إلى الصفحة الأولى'; + } + if (type === 'last') { + return 'الانتقال إلى الصفحة الأخيرة'; + } + if (type === 'next') { + return 'الانتقال إلى الصفحة التالية'; + } + // if (type === 'previous') { + return 'الانتقال إلى الصفحة السابقة'; + }, + labelRowsPerPage: 'عدد الصفوف في الصفحة:', + labelDisplayedRows: ({ from, to, count }) => + `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`, + }, + }, + MuiRating: { + defaultProps: { + getLabelText: (value) => `${value} ${value !== 1 ? 'نجوم' : 'نجمة'}`, + emptyLabelText: 'فارغ', + }, + }, + MuiAutocomplete: { + defaultProps: { + clearText: 'مسح', + closeText: 'إغلاق', + loadingText: 'جار التحميل...', + noOptionsText: 'لا توجد خيارات', + openText: 'فتح', + }, + }, + MuiAlert: { + defaultProps: { + closeText: 'إغلاق', + }, + }, + MuiPagination: { + defaultProps: { + '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 'الانتقال إلى الصفحة السابقة'; + }, + }, + }, + }, +}; + export const arSD: Localization = { components: { MuiBreadcrumbs: {