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 Armenian (hy-AM) locale #19844

Merged
merged 3 commits into from
Feb 25, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 48 additions & 47 deletions docs/src/pages/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,60 @@ import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import { zhCN } from '@material-ui/core/locale';

const theme = createMuiTheme({
palette: {
primary: { main: '#1976d2' },
},
}, zhCN);
palette: {
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
primary: { main: '#1976d2' },
},
}, zhCN);

<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
```
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
```

### Supported locales
### Supported locales

| Locale | BCP 47 language tag | Import name
|:-------|:---------|:---------|
| Azerbaijani | az-AZ | `azAZ` |
| Bulgarian | bg-BG | `bgBG` |
| Catalan | ca-ES | `caES` |
| Chinese (Simplified) | zh-CN | `zhCN` |
| Czech | cs-CZ | `csCZ` |
| Dutch | nl-NL | `nlNL` |
| English (United States) | en-US | `enUS` |
| Estonian | et-EE | `etEE` |
| Finnish | fi-FI | `fiFI` |
| French | fr-FR | `frFR` |
| German | de-DE | `deDE` |
| Hungarian | hu-HU | `huHU` |
| Icelandic | is-IS | `isIS` |
| Indonesian | id-ID | `idID` |
| Italian | it-IT | `itIT` |
| Japanese | ja-JP | `jaJP` |
| Korean | ko-KR | `koKR` |
| Persian | fa-IR | `faIR` |
| Polish | pl-PL | `plPL` |
| Portuguese (Brazil) | pt-BR | `ptBR` |
| Portuguese | pt-PT | `ptPT` |
| Romanian | ro-RO | `roRO` |
| Russian | ru-RU | `ruRU` |
| Slovak | sk-SK | `skSK` |
| Spanish | es-ES | `esES` |
| Swedish | sv-SE | `svSE` |
| Turkish | tr-TR | `trTR` |
| Ukrainian | uk-UA | `ukUA` |
| Vietnamese | vi-VN | `viVN` |
| Locale | BCP 47 language tag | Import name
|:-------|:---------|:---------|
| Armenian | hy-AM | `hyAM` |
| Azerbaijani | az-AZ | `azAZ` |
| Bulgarian | bg-BG | `bgBG` |
| Catalan | ca-ES | `caES` |
| Chinese (Simplified) | zh-CN | `zhCN` |
| Czech | cs-CZ | `csCZ` |
| Dutch | nl-NL | `nlNL` |
| English (United States) | en-US | `enUS` |
| Estonian | et-EE | `etEE` |
| Finnish | fi-FI | `fiFI` |
| French | fr-FR | `frFR` |
| German | de-DE | `deDE` |
| Hungarian | hu-HU | `huHU` |
| Icelandic | is-IS | `isIS` |
| Indonesian | id-ID | `idID` |
| Italian | it-IT | `itIT` |
| Japanese | ja-JP | `jaJP` |
| Korean | ko-KR | `koKR` |
| Persian | fa-IR | `faIR` |
| Polish | pl-PL | `plPL` |
| Portuguese (Brazil) | pt-BR | `ptBR` |
| Portuguese | pt-PT | `ptPT` |
| Romanian | ro-RO | `roRO` |
| Russian | ru-RU | `ruRU` |
| Slovak | sk-SK | `skSK` |
| Spanish | es-ES | `esES` |
| Swedish | sv-SE | `svSE` |
| Turkish | tr-TR | `trTR` |
| Ukrainian | uk-UA | `ukUA` |
| Vietnamese | vi-VN | `viVN` |

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.
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.
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved

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.)

### Example
### Example

{{"demo": "pages/guides/localization/Locales.js", "defaultCodeOpen": false}}
{{"demo": "pages/guides/localization/Locales.js", "defaultCodeOpen": false}}

## RTL Support
## RTL Support

Right-to-left languages such as Arabic, Persian or Hebrew are supported.
Follow [this guide](/guides/right-to-left/) to use them.
Right-to-left languages such as Arabic, Persian or Hebrew are supported.
Follow [this guide](/guides/right-to-left/) to use them.
1 change: 1 addition & 0 deletions packages/material-ui/src/locale/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const hyAM: object;
export const azAZ: object;
export const bgBG: object;
export const caES: object;
Expand Down
25 changes: 25 additions & 0 deletions packages/material-ui/src/locale/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
export const hyAM = {
props: {
MuiTablePagination: {
backIconButtonText: 'Նախորդը',
labelRowsPerPage: 'Տողեր մեկ էջում`',
labelDisplayedRows: ({ from, to, count }) => `${from}-${to === -1 ? count : to} / ${count}`,
nextIconButtonText: 'Հաջորդը',
},
MuiRating: {
getLabelText: value => `${value} Աստղ`,
emptyLabelText: 'Դատարկ',
},
MuiAutocomplete: {
clearText: 'Մաքրել',
closeText: 'Փակել',
loadingText: 'Բեռնում…',
noOptionsText: 'Տարբերակներ չկան',
openText: 'Բացել',
},
MuiAlert: {
closeText: 'Փակել',
},
},
};

export const azAZ = {
props: {
MuiTablePagination: {
Expand Down