Skip to content

MUI Arabic localization

Localize Material UI labels, pagination, date pickers and Data Grid text into Arabic, with consistent date formats, digits and accessible names.

By , Founder of Ritla

Guide13 min read

An Arabic inspection dashboard can have translated headings and correctly mirrored fields while its calendar still announces English controls. Its pagination may use Arabic words around Western digits, then switch numeral systems inside a custom summary. These failures come from different sources, even though they appear on the same MUI screen.

MUI Arabic localization requires more than importing one locale object. Material UI core, MUI X components, the date adapter and application messages have separate responsibilities. Their locale identifiers and translation coverage are not interchangeable.

This guide follows a greenhouse-inspection console: a visit scheduler, inspection records and a report action. It uses current package APIs and distinguishes complete configuration from deliberately partial translation examples. Check the documentation for your installed major before carrying these examples into an older project.

Identify who owns each untranslated string#

Start with the rendered control and the source of its text. A locale object can supply a component's default wording; it cannot translate arbitrary text that the application passes into that component.

Text or behaviorConfiguration to inspect
Material UI pagination and built-in control labelsCore locale and explicit component props
Picker actions and accessible control namesPicker localeText
Picker month names, parsing and date formatDate adapter, loaded date-library locale and format
Data Grid menus, filtering and overlaysGrid locale and localeText overrides
Field labels, column headings and report actionsApplication translation messages
Numbers and dates in custom summariesApplication formatters
Mirroring and DOM directionRTL styling configuration and HTML dir

Record an untranslated string with the state that reveals it. Include the selected locale, whether a popup is open, and whether the control is empty, loading or invalid. An English calendar-opening label is a different defect from an English month name. Changing the adapter locale to fix both leaves one configuration boundary unexamined.

Keep layout diagnosis separate. MUI's RTL setup coordinates document direction, theme direction and the styling engine. A translated menu can still have the wrong direction, and a correctly mirrored menu can still contain English labels. Establish that setup without trying to solve translation through CSS.

Apply the core locale without replacing the product theme#

Material UI provides regional Arabic locale objects, including arEG, arSA and arSD. Choose one deliberately. A product serving Saudi inspection teams can use arSA as a starting point, while still reviewing the wording against its terminology.

Here is the component-text layer for an application whose RTL styling cache is already configured:

tsx
import type { ReactNode } from 'react';import { createTheme, ThemeProvider } from '@mui/material/styles';import { deepmerge } from '@mui/utils';import { arSA } from '@mui/material/locale'; const theme = createTheme(deepmerge({  direction: 'rtl',  palette: { primary: { main: '#28634b' } },}, arSA)); export function ArabicComponentText({ children }: { children: ReactNode }) {  return <ThemeProvider theme={theme}>{children}</ThemeProvider>;}

In the product, merge the locale into the existing theme options so that typography, component overrides and palette remain available. The sample defines its own small palette only to make the composition visible. It does not configure Emotion or the document.

The core localization guide documents the locale imports. The theming reference recommends explicitly merging options before passing them to createTheme; its older multiple-argument behavior remains supported for compatibility but may change.

Avoid combining locale objects with a shallow spread at the top level. Both product options and locale data can contain a components object. Replacing that whole branch can discard unrelated defaults or translations. Inspect the resulting component defaults when a previously working control regresses after a theme change.

Explicit props also matter. A component with an application-supplied English label can retain that label beneath an Arabic theme. Search for the prop at its call site and in wrapper components before concluding that the locale import failed. Check the theme actually reaching the component when an embedded dashboard introduces another provider.

Declare the page language through HTML as well. The W3C language guidance explains that lang identifies content language; it does not translate strings. Keep the resolved document language, application messages and selected MUI locale in agreement on direct loads and language changes.

Localize pagination values as well as surrounding words#

Pagination combines translated labels, dynamic numbers and accessible names. Checking only the rows-per-page caption misses the rest of the control.

Consider this application override inside an otherwise Arabic theme:

tsx
import type { TablePaginationProps } from '@mui/material/TablePagination'; // Problem: assign this callback to the inspection control's labelDisplayedRows.const englishInspectionRange: NonNullable<TablePaginationProps['labelDisplayedRows']> =  ({ from, to, count }) => `${from}-${to} of ${count}`;

The callback supplies English text directly and assumes the total is known. The locale cannot rewrite that returned string. Repair the same callback instead of adding CSS around its output.

The following standalone pagination probe uses Western digits because that is this console's chosen number policy:

tsx
import { useState } from 'react';import TablePagination from '@mui/material/TablePagination'; const inspectionNumbers = new Intl.NumberFormat('ar-SA', {  numberingSystem: 'latn',});const pageNames: Record<string, string> = {  first: 'الانتقال إلى الصفحة الأولى',  last: 'الانتقال إلى الصفحة الأخيرة',  next: 'الانتقال إلى الصفحة التالية',  previous: 'الانتقال إلى الصفحة السابقة',}; export function InspectionPagination({ total }: { total: number }) {  const [page, setPage] = useState(0);  const [rowsPerPage, setRowsPerPage] = useState(25);  const number = (value: number) => inspectionNumbers.format(value);  return (    <TablePagination      component="div" count={total} page={page} rowsPerPage={rowsPerPage}      rowsPerPageOptions={[25, 50]}      onPageChange={(_, nextPage) => setPage(nextPage)}      onRowsPerPageChange={(event) => {        setRowsPerPage(Number(event.target.value));        setPage(0);      }}      labelRowsPerPage="سجلات الفحص في الصفحة"      getItemAriaLabel={(type) => pageNames[type] ?? 'التنقل بين الصفحات'}      labelDisplayedRows={({ from, to, count }) => count === -1        ? `من ${number(from)} إلى ${number(to)}، الإجمالي أكثر من ${number(to)}`        : `من ${number(from)} إلى ${number(to)}، الإجمالي ${number(count)}`}    />  );}

Render it beneath the Arabic providers. Pass the actual total, or -1 for an unknown total. This probe changes pagination state; the parent record list must use that state to request or select its rows when integrated. Keep the page valid if filtering reduces the total.

The TablePagination API defines zero-based pages, the unknown-total sentinel and label callbacks. An unknown total must not appear as a negative record count. Test an empty result, a partial final page, a changed page size and a server response whose total is unknown.

The words in this callback are a complete translated message, not an English template with one noun replaced. If another message counts inspections with a noun, use the application's plural support. Intl.PluralRules selects a grammatical category; it does not supply the Arabic sentence. Have the translation system provide the corresponding wording and test its categories.

Configure picker formatting and picker interface text independently#

Loading an Arabic date-library locale can change month names without translating the picker's buttons. Supplying Arabic localeText can translate those buttons while leaving date formatting in English. Both outcomes are explainable: the settings serve different consumers.

For Day.js, install the picker package and Day.js if they are not already dependencies. Follow the picker quickstart for compatible dependencies and adapter setup. Load the date-library locale before using it, as described by Day.js locale loading.

This example configures Arabic date formatting and a partial set of picker translations. It is a boundary test, not a complete Arabic picker bundle:

tsx
import dayjs from 'dayjs';import 'dayjs/locale/ar';import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';import { DatePicker } from '@mui/x-date-pickers/DatePicker';import type { PickersLocaleText } from '@mui/x-date-pickers/locales'; const inspectionPickerText = {  previousMonth: 'الشهر السابق',  nextMonth: 'الشهر التالي',  cancelButtonLabel: 'إلغاء الموعد',  okButtonLabel: 'تأكيد الموعد',  clearButtonLabel: 'مسح الموعد',  todayButtonLabel: 'اليوم',  datePickerToolbarTitle: 'اختيار موعد فحص الدفيئة',  openDatePickerDialogue: (formattedDate: string | null) => formattedDate    ? `تغيير موعد الفحص، الموعد الحالي ${formattedDate}`    : 'اختيار موعد الفحص',} satisfies Partial<PickersLocaleText>; export function InspectionDate() {  return (    <LocalizationProvider      dateAdapter={AdapterDayjs} adapterLocale="ar"      localeText={inspectionPickerText}    >      <DatePicker        label="موعد فحص الدفيئة"        defaultValue={dayjs('2031-11-19')}        format="DD MMMM YYYY"      />    </LocalizationProvider>  );}

Render it inside the configured Arabic MUI environment. The ar identifier belongs to Day.js; it is not the core theme's arSA import. Other adapters accept different locale forms, so replacing the adapter requires checking its documented contract.

At the time of this guide, the picker translation list does not list an Arabic bundle. Do not invent an arSA picker import because core exports one. Supply reviewed Arabic translations for the keys used by the installed picker version, and revisit coverage when upgrading.

The picker locale interface includes functions as well as strings. Preserve their argument contracts when translating dynamic accessible names. The partial example intentionally leaves other keys unresolved; extend it before release to cover view switching, field sections and every picker variant the console exposes. A typed key can still contain unsuitable wording, so type checking complements language review.

Maintain the reviewed translations in an application module rather than editing package files. Check that module against the installed locale type during upgrades. Partial<PickersLocaleText> permits missing entries, which suits a small reproduction but cannot enforce release completeness. For a full bundle, require the complete type and review new keys as part of the dependency update. If the product intentionally covers only selected variants, maintain an explicit list of their required keys and exercise those controls. Absence of a type error is not a translation-coverage test.

The date-format localization documentation also distinguishes field placeholders from date-library formatting. Inspect the empty field, not only its filled value. Test typed entry, section navigation, clearing, the month view and the mobile dialog. Those states expose different translations.

Find overrides and validation messages that bypass the locale#

Picker text can come from the theme, LocalizationProvider or a component's localeText. Local picker keys can override provider translations. If one calendar remains English, inspect its explicit configuration before replacing the application's entire locale bundle.

Use a deliberate override during diagnosis: change one month-navigation label, open that picker and inspect the corresponding accessible name. If it changes, the local translation path works. Restore the reviewed wording, then investigate the remaining source. This narrows the problem without assuming every label comes from the same object.

Validation is another application boundary. A picker can mark a date invalid, but the product still needs an Arabic explanation of what the inspector should change. Map the validation reason to an application message rather than exposing a technical error code.

MUI's validation guide shows how onError and the text-field slot can display feedback. For the inspection scheduler, distinguish an invalid date from one outside the allowed booking window. A generic message that says only to retry does not explain either correction.

Keep the error reason in state and translate it when rendering. Saving an already translated English sentence in state can leave stale wording after a language switch. Apply the same approach to success notifications and delayed request failures. Test a switch while the error is visible and while a request is pending.

R071 covers untranslated form labels, validation and help text. It does not establish that disabled dates follow the scheduling policy. Test the earliest permitted visit, the latest permitted visit and a rejected value against the actual business rule.

Give Data Grid its own locale and review missing coverage#

Material UI core localization does not localize every MUI X package. Data Grid has a separate locale source, including an Arabic Sudanese bundle. Its wording and coverage need review for this console; importing it is a starting point, not a declaration that all grid states are translated.

This probe makes the grid's locale source explicit:

tsx
import { DataGrid, type GridColDef } from '@mui/x-data-grid';import { arSD } from '@mui/x-data-grid/locales'; const columns: GridColDef[] = [  { field: 'site', headerName: 'موقع الدفيئة', width: 220 },  { field: 'ventilation', headerName: 'حالة التهوية', width: 180 },];const rows = [  { id: 'fern-house', site: 'دفيئة السرخس', ventilation: 'تحتاج إلى مراجعة' },];const gridText = {  ...arSD.components.MuiDataGrid.defaultProps.localeText,  noRowsLabel: 'لا توجد زيارات فحص مسجلة',  noResultsOverlayLabel: 'لا توجد زيارات تطابق التصفية',}; export function InspectionRecords() {  return (    <div style={{ height: 360, width: '100%' }}>      <DataGrid rows={rows} columns={columns} localeText={gridText} />    </div>  );}

The column headings and cell values are application-owned Arabic content. The grid locale does not translate those fields. Keep stable field identifiers and translate their display labels so that changing language does not change the data schema.

Apply the same distinction to server-provided status codes. A stored ventilation status can remain a stable machine value while a cell renderer selects its Arabic display message. Do not save the translated label back as the status code or use it as the key for update requests. Reopen the same record in English and Arabic to confirm that only its presentation changes. If the server returns a free-text inspection note, preserve it as user content rather than treating it as a missing library translation.

The Data Grid localization guide documents the package-specific imports and overrides. The Arabic locale source also shows untranslated entries left as comments. Review the installed release rather than assuming a supported locale has complete coverage.

Open column menus, filters, pagination controls and the toolbar features the product enables. Force both an empty dataset and a filter with no matches; they are different states with different messages. Do not enable unrelated grid features merely to create a larger translation task.

Grid pagination has its own formatting hooks, including paginationDisplayedRows in current releases. A fix to core TablePagination does not automatically configure that grid hook. Check its unknown and estimated total behavior separately. Custom cell formatting also needs care: the column-definition documentation explains that display formatting and the values used for sorting or filtering serve different purposes. Retain numeric data and format its presentation.

Choose one number policy and make custom summaries follow it#

Arabic interface language does not prescribe a single numeral system for every product. Decide the intended system for inspection counts, capacity readings and visit dates, then configure each formatter that owns those values.

The pagination example selected latn. A custom capacity summary should use the same decision rather than the browser's default locale:

tsx
import Typography from '@mui/material/Typography'; const volumeFormat = new Intl.NumberFormat('ar-SA', {  numberingSystem: 'latn',  maximumFractionDigits: 0,}); export function IrrigationCapacity() {  return (    <Typography>      سعة خزان الري: {volumeFormat.format(2684)} لتر    </Typography>  );}

The Intl.NumberFormat reference documents locale-sensitive formatting. Inspect the formatter's resolved options when a runtime produces unexpected digits. Avoid manually replacing characters across the rendered page: that mixes presentation changes with identifiers, editable fields and values whose original spelling matters.

An Intl formatter does not control Day.js or every built-in component callback. Compare the summary, pagination range, page-size options and picker day cells in the same test. Configure each supported formatting boundary, and document any remaining exception instead of promising consistency from one global setting.

R061 covers Arabic-Indic and Western digits mixed in the same context. Review which context the product intends to keep consistent. A technical identifier with a fixed spelling is a different concern from inspection counts. For mixed-content behavior beyond formatting, use numbers inside RTL text.

Separate date language, calendar and time zone#

An Arabic month name does not establish which calendar or time zone the console uses. Define those requirements explicitly. This inspection console uses Gregorian visit dates and displays event timestamps in Riyadh time.

For a read-only timestamp summary:

js
const inspectionTimestamp = new Intl.DateTimeFormat('ar-SA', {  calendar: 'gregory',  numberingSystem: 'latn',  timeZone: 'Asia/Riyadh',  year: 'numeric', month: 'long', day: 'numeric',  hour: '2-digit', minute: '2-digit', hourCycle: 'h23',}); const scheduledInstant = new Date('2031-11-19T06:20:00Z');console.log(inspectionTimestamp.format(scheduledInstant));

The Intl.DateTimeFormat options make those choices explicit. This formatter controls the summary only. Configure picker time-zone behavior through the chosen adapter and the picker time-zone API; do not assume the summary's options reach it.

A date-only inspection day is not automatically an instant at UTC midnight. Preserve the application's date-only contract, and test serialization and reloading before converting such a value through a timestamp pipeline. Use a near-midnight event fixture to reveal discrepancies between a stored instant and its displayed local day.

For a Hijri requirement, evaluate calendar support separately. MUI's calendar-systems guide documents adapter-specific support and field limitations. Changing month labels or passing an Arabic locale does not implement a different calendar's arithmetic.

R060 covers English month/day names or month/day/year dates in Arabic text. That check does not verify that a timestamp represents the intended instant. Compare the selected visit, saved value and reopened summary by hand. See dates and times inside RTL interfaces for deeper date-display decisions.

Inspect accessible names and states outside the initial screen#

A translated heading cannot establish that the report action is localized. Inspect application-supplied aria-label, tooltip, placeholder and helper text alongside visible labels. Use the action's meaning in Arabic; copying the icon's name does not necessarily tell an inspector what it does.

For example, an application can pass an English accessible name to a report-download IconButton even under the Arabic theme. Give that same action the reviewed Arabic name:

tsx
import IconButton from '@mui/material/IconButton';import DownloadIcon from '@mui/icons-material/Download'; export function InspectionReportAction({ downloadReport }: {  downloadReport: () => void;}) {  return (    <IconButton      onClick={downloadReport}      aria-label="تنزيل تقرير فحص الدفيئة"    >      <DownloadIcon />    </IconButton>  );}

The parent supplies downloadReport, the existing report-download handler, and the example uses the separate @mui/icons-material package. Replacing the name leaves the action unchanged. Inspect the rendered button's accessible name, then activate it to verify that the expected report still downloads.

R012 covers untranslated attribute text, including aria-label. R011 covers untranslated interactive labels such as buttons, menu items and tabs. Keep the distinction: a screenshot can show translated button text while its accessible name still needs inspection.

Autocomplete deserves a state-based review too. The Autocomplete API exposes loading, no-options and control text alongside application-provided option labels. Slow the site lookup, search for an absent greenhouse and inspect the clear and popup controls. Translating the field label alone does not exercise those states.

Give custom slots the same review. Replacing a built-in loading indicator, action bar or empty overlay with an application component introduces application-owned text. Check what the slot receives and which translation source it uses; do not assume the built-in component's locale is automatically applied to arbitrary children. Trigger the slot through its real interaction, including its keyboard path, so that both visible text and accessible names are inspected.

Test the compact layout and desktop layout after fonts load. Long Arabic labels can wrap, clip or collide even when every translation key is present. Keep visual verification alongside text assertions; neither proves the other. For field feedback that needs more design work, continue with Arabic form validation messages.

Verify localization through complete inspection journeys#

Build regression coverage around what the inspector can perceive and operate. MUI's testing guidance recommends testing rendered controls instead of depending on component internals. Assert the expected accessible names and visible messages, then use visual checks for layout and clipping.

  • Load the Arabic visit page directly and inspect its first response and hydrated state.
  • Open the scheduler empty, select a date, clear it and trigger each relevant validation message.
  • Check desktop popup and mobile dialog wording, including controls revealed by keyboard navigation.
  • Exercise record pagination with empty, known-total and unknown-total results.
  • Open enabled grid menus and force loading, empty and no-match states.
  • Compare numbers and dates across controls using the same saved inspection data.
  • Switch languages with a validation error visible and a request in progress, then navigate back.

Resolve locale once and use it to select application messages, theme text, adapter configuration and formatters. If bundles load asynchronously, avoid displaying a half-updated page while one layer still uses the previous language. Verify that switching preserves the selected visit and that returning to the Arabic route restores the same formatting policy.

On a server-rendered page, compare the initial HTML with the interactive result using the same saved fixture. The server and browser need the same locale and formatting decisions; relying on each environment's defaults can produce different output before and after hydration. Test with a browser interface set to English while the product route is Arabic. This exposes accidental reliance on browser preferences. Also run the Arabic route first in a fresh session, since a preceding English visit can change which bundles or component state are already available.

Record defects with the component, translation key or application prop, interaction state and expected wording. After a package upgrade, review new translation keys and replay these states. A successful import only proves that the bundle can load.

A free Ritla scan of the Arabic inspection page can surface untranslated interactive labels, attribute text and form feedback. Continue with Arabic localization testing to plan coverage across the inspection journey, or Arabic form validation messages when errors still expose English wording.

Checks in this guide

See what your Arabic pages are hiding

Paste a URL. Ritla renders the page on desktop and mobile, runs every check, and shows the top issues with screenshot evidence.

Scan a page freeBrowse the checks