diff --git a/src/lib/vm-manager-hoc.jsx b/src/lib/vm-manager-hoc.jsx index 926c25cd7..2a77bcf3f 100644 --- a/src/lib/vm-manager-hoc.jsx +++ b/src/lib/vm-manager-hoc.jsx @@ -33,6 +33,7 @@ const vmManagerHOC = function (WrappedComponent) { this.props.vm.attachAudioEngine(this.audioEngine); this.props.vm.setCompatibilityMode(true); this.props.vm.initialized = true; + this.props.vm.setLocale(this.props.locale, this.props.messages); } if (!this.props.isPlayerOnly && !this.props.isStarted) { this.props.vm.start(); @@ -105,6 +106,8 @@ const vmManagerHOC = function (WrappedComponent) { isLoadingWithId: PropTypes.bool, isPlayerOnly: PropTypes.bool, loadingState: PropTypes.oneOf(LoadingStates), + locale: PropTypes.string, + messages: PropTypes.objectOf(PropTypes.string), onError: PropTypes.func, onLoadedProject: PropTypes.func, onSetProjectUnchanged: PropTypes.func, @@ -119,6 +122,8 @@ const vmManagerHOC = function (WrappedComponent) { return { fontsLoaded: state.scratchGui.fontsLoaded, isLoadingWithId: getIsLoadingWithId(loadingState), + locale: state.locales.locale, + messages: state.locales.messages, projectData: state.scratchGui.projectState.projectData, projectId: state.scratchGui.projectState.projectId, loadingState: loadingState,