diff --git a/packages/blockly-extension/src/index.ts b/packages/blockly-extension/src/index.ts index b9016ad..8437fb7 100644 --- a/packages/blockly-extension/src/index.ts +++ b/packages/blockly-extension/src/index.ts @@ -168,8 +168,10 @@ const plugin: JupyterFrontEndPlugin = { // Get new language and call the function that modifies the language name accordingly. // Also, make the transformation to have the name of the language package as in Blockly. const language = - currentLocale[currentLocale.length - 2].toUpperCase() + - currentLocale[currentLocale.length - 1].toLowerCase(); + currentLocale === 'default' + ? 'En' + : currentLocale[currentLocale.length - 2].toUpperCase() + + currentLocale[currentLocale.length - 1].toLowerCase(); console.log(`Current Language : '${language}'`); // Transmitting the current language to the manager.