Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/src/pages/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ const theme = createMuiTheme({

You can [find the source](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/locale/index.js) in the GitHub repository.

To create your own translation, or to customise the English text, copy this file to your project, make any changes needed and import the locale from there. (Please do consider contributing new translations back to Material-UI by opening a pull request.)
To create your own translation, or to customise the English text, copy this file to your project, make any changes needed and import the locale from there.

Please do consider contributing new translations back to Material-UI by opening a pull request.
However, Material-UI aims to support the [100 most popular locales](https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers), we might not accept contributions for locales that are not frequently used, for instance `gl-ES` that has "only" 2.5 million native speakers.

### Example

Expand Down
49 changes: 49 additions & 0 deletions packages/material-ui/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,55 @@ export const frFR: Localization = {
},
};

export const glES: Localization = {
props: {
MuiBreadcrumbs: {
expandText: 'Mostrar camiño',
},
MuiTablePagination: {
backIconButtonText: 'Páxina anterior',
labelRowsPerPage: 'Filas por páxina:',
labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} de ${count}`,
nextIconButtonText: 'Seguinte páxina',
},
MuiRating: {
getLabelText: (value) => `${value} Estrela${value !== 1 ? 's' : ''}`,
emptyLabelText: 'Baleira',
},
MuiAutocomplete: {
clearText: 'Limpar',
closeText: 'Pechar',
loadingText: 'Cargando…',
noOptionsText: 'Sen opcións',
openText: 'Aberto',
},
MuiAlert: {
closeText: 'Pechar',
},
MuiPagination: {
'aria-label': 'Paxinador',
getItemAriaLabel: (type, page, selected) => {
if (type === 'page') {
return `${selected ? '' : 'Ir á '}páxina ${page}`;
}
if (type === 'first') {
return 'Ir á primeira páxina';
}
if (type === 'last') {
return 'Ir á última páxina';
}
if (type === 'next') {
return 'Ir á páxina seguinte';
}
if (type === 'previous') {
return 'Ir á páxina anterior';
}
return undefined;
},
},
},
};

export const heIL: Localization = {
props: {
// MuiBreadcrumbs: {
Expand Down