You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/i18n.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,9 @@
2
2
3
3
React-Setup uses [React-Intl](https://github.com/yahoo/react-intl) for internationalization.
4
4
5
-
Each component has a 'messages.js' file which contains i18n strings to use in the component.
5
+
Each component has a `messages.js` file which contains i18n strings to use in the component.
6
6
7
-
Running '$ npm run build-msg' will invoke babel-plugin-react-intl to go through all 'messages.js' files and generate 'messages.json' files under /dist.
7
+
Running `$ npm run build-msg` will invoke babel-plugin-react-intl to go through all `messages.js` files and generate `messages.json` files under `/dist`.
8
8
9
-
/server/libs/i18n.js has a helper function called 'getLocaleMessages' which returns an object with all translated strings from 'messages.json' files. This object then gets injected to the index page (see: index-page.js) as a global variable so components can use them at runtime.
9
+
`/server/libs/i18n.js` has a helper function called `getLocaleMessages` which returns an object with all translated strings from `messages.json` files.
10
+
This object then gets injected to the index page (see: `index-page.js`) as a global variable so components can use them at runtime.
0 commit comments