summaryrefslogtreecommitdiffstats
path: root/src/I18n.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/I18n.js')
-rw-r--r--src/I18n.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/I18n.js b/src/I18n.js
index ae3ba2fa9..4ee34157c 100644
--- a/src/I18n.js
+++ b/src/I18n.js
@@ -9,11 +9,18 @@ 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 componentDidUpdate() {
13 window.franz.menu.rebuild();
14 }
15
12 render() { 16 render() {
13 const { stores, children } = this.props; 17 const { stores, children } = this.props;
14 const { locale } = stores.app; 18 const { locale } = stores.app;
15 return ( 19 return (
16 <IntlProvider {...{ locale, key: locale, messages: translations[locale] }}> 20 <IntlProvider
21 {...{ locale, key: locale, messages: translations[locale] }}
22 ref={(intlProvider) => { window.franz.intl = intlProvider ? intlProvider.getChildContext().intl : null; }}
23 >
17 {children} 24 {children}
18 </IntlProvider> 25 </IntlProvider>
19 ); 26 );