Skip to content

Commit 67ee202

Browse files
committed
TASK: Enhance the i18n initialization in the index page component via query parameters
1 parent 92035e5 commit 67ee202

File tree

1 file changed

+3
-1
lines changed
  • packages/create-react-microservice-scaffold/src/packages/my-fancy-ui/src/pages

1 file changed

+3
-1
lines changed

packages/create-react-microservice-scaffold/src/packages/my-fancy-ui/src/pages/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ class IndexPage extends Component<PropsType> {
3434

3535
render() {
3636
const {errors, query, initialState, reduxSagaContext} = this.props;
37-
const {name = 'mate'} = query;
37+
const {name = 'mate', locale = 'en-US'} = query;
3838
const {store} = Store.createStore({
3939
reduxSagaContext,
4040
initialState
4141
});
4242

43+
i18n.locale(locale);
44+
4345
errors.forEach(err => {
4446
logger.error('Server-Side-Error:', err.message, err.stack);
4547
});

0 commit comments

Comments
 (0)