aboutsummaryrefslogtreecommitdiffstats
path: root/src/I18n.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/I18n.js')
-rw-r--r--src/I18n.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/I18n.js b/src/I18n.js
index ae3ba2fa9..5ba7c8c7e 100644
--- a/src/I18n.js
+++ b/src/I18n.js
@@ -9,11 +9,19 @@ import UserStore from './stores/UserStore';
9 9
10@inject('stores') @observer 10@inject('stores') @observer
11export default class I18N extends Component { 11export default class I18N extends Component {
12
13 componentDidUpdate() {
14 window.franz.menu.rebuild();
15 }
16
12 render() { 17 render() {
13 const { stores, children } = this.props; 18 const { stores, children } = this.props;
14 const { locale } = stores.app; 19 const { locale } = stores.app;
15 return ( 20 return (
16 <IntlProvider {...{ locale, key: locale, messages: translations[locale] }}> 21 <IntlProvider
22 {...{ locale, key: locale, messages: translations[locale] }}
23 ref={(intlProvider) => { window.franz.intl = intlProvider ? intlProvider.getChildContext().intl : null; }}
24 >
17 {children} 25 {children}
18 </IntlProvider> 26 </IntlProvider>
19 ); 27 );