fix the language selection

This commit is contained in:
Mario
2021-01-13 14:08:36 +01:00
parent 97e28b62f8
commit b25a4d602a
50 changed files with 4764 additions and 2437 deletions
+6 -2
View File
@@ -15,17 +15,21 @@ class Content extends Component {
componentDidMount() {
if (this.props.language === 'de_DE') {
console.log("change Language")
Blockly.setLocale(De);
} else if (this.props.language === 'en_US') {
Blockly.setLocale(En);
}
}
componentDidUpdate(props){
if(props.language !== this.props.language){
componentDidUpdate(props) {
console.log(this.props.language)
if (props.language !== this.props.language) {
if (this.props.language === 'de_DE') {
console.log("change Language")
Blockly.setLocale(De);
} else if (this.props.language === 'en_US') {
console.log("change Language")
Blockly.setLocale(En);
}
}