Skip to content

Commit b5d5e55

Browse files
authored
Update README.md
1 parent 535c282 commit b5d5e55

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Run `npm start` to view the demo
1111

1212
## Demo
1313

14-
<Image>
14+
![Demo image](https://raw.githubusercontent.com/applelok/react-localization/master/src/img/demo.gif)
1515

1616
## Highlights
1717

@@ -36,7 +36,7 @@ const messages = {
3636

3737
```
3838

39-
But in fact we can (also prefer to) define the keys and values each of the language folder (src/i18n) with object type, which will be more readable.
39+
But in fact we can (also prefer to) define the keys and values in each of the language folder (src/i18n) with object type, which will be more readable.
4040

4141
```javascript
4242
// src/i18n/en
@@ -59,6 +59,7 @@ export const student = {
5959
Using flat, we can flatten the keys in language object automatically, and convert into a correct format for react-intl
6060

6161
```javascript
62+
import flatten from "flat";
6263

6364
const messages = {
6465
en: flatten(en),
@@ -69,7 +70,7 @@ const messages = {
6970
### Centralizing the place for retrieving locale keys
7071
We can centralize the locale keys to avoid the typo.
7172

72-
73+
![locale keys centralized image](https://raw.githubusercontent.com/applelok/react-localization/master/src/img/locale_keys_centralized.png)
7374

7475

7576
### Setting default language

0 commit comments

Comments
 (0)