Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Update Localization and Autocomplete docs

Co-Authored-By: Matt <[email protected]>
  • Loading branch information
soltanloo and mbrookes authored Nov 15, 2019
1 parent 8e1f9ad commit 22d296b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions docs/src/pages/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<p class="description">Localization (also referred to as "l10n") is the process of adapting a product or content to a specific locale or market.</p>

The default locale of Material-UI is English (United States). If you want to use other locales, you can follow the instructions below.
The default locale of Material-UI is English (United States). If you want to use other locales, follow the instructions below.

## Locale text

Use the theme to configure the locale text globally
Use the theme to configure the locale text globally:

```jsx
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
Expand Down Expand Up @@ -37,13 +37,15 @@ const theme = createMuiTheme({
| Russian | ru-RU | `ruRU` |
| Spanish | es-ES | `esES` |

You can find the [sources](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.

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

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

## RTL Support

Right-to-left languages are Arabic, Hebrew, and others.
Follow [the guide](/guides/right-to-left/) to use them.
Right-to-left languages such as Arabic or Hebrew are supported.
Follow [this guide](/guides/right-to-left/) to use them.
6 changes: 3 additions & 3 deletions packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export interface AutocompleteProps
*/
closeIcon?: React.ReactNode;
/**
* Text label for the clear icon button.
* Override the default text for the *clear* icon button.
*/
clearText?: string;
/**
* Text label for the close popup icon button.
* Override the default text for the *close popup* icon button.
*/
closeText?: string;
/**
Expand Down Expand Up @@ -80,7 +80,7 @@ export interface AutocompleteProps
*/
noOptionsText?: React.ReactNode;
/**
* Text label for the open popup icon button.
* Override the default text for the *open popup* icon button.
*/
openText?: string;
/**
Expand Down

0 comments on commit 22d296b

Please sign in to comment.