Locale
import { DefaultTheme } from "@shpaw415/mui-lite/theme";
// strings: import { frFR, deDE, … } from "@shpaw415/mui-lite/locale";Why use it
locale provides translated default strings for Pagination, Alert, Autocomplete labels, and related a11y text (59 locales). Set theme.locale to a SupportedLocalesType key so components pick the right copy without per-component i18n wiring.
Demo
Locales live under @shpaw415/mui-lite/locale. Set theme.locale on your MuiTheme (e.g. frFR, deDE, jaJP). Components such as Pagination and Alert read strings via useLanguages.
import { DefaultTheme } from "@shpaw415/mui-lite/theme";
const theme = {
...DefaultTheme,
locale: "frFR" as const,
};
// Available: enUS, frFR, deDE, esES, jaJP, zhCN, ptBR, …
// See mui/locale for the full SupportedLocalesType list.Example
import { ThemeProvider, DefaultTheme } from "@shpaw415/mui-lite/theme";
const theme = {
...DefaultTheme,
locale: "frFR" as const,
};
export function App({ children }: { children: React.ReactNode }) {
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
}Common locale keys
enUS, frFR, deDE, esES, itIT, ptBR, ptPT, jaJP, zhCN, zhTW, zhHK, koKR, ruRU, arSA, hiIN, nlNL, plPL, trTR, viVN, thTH, …
Full list: SupportedLocalesType in @shpaw415/mui-lite/locale.