ide-electron icon indicating copy to clipboard operation
ide-electron copied to clipboard

How can I change the language?

Open SiavashTafazoli opened this issue 3 years ago • 3 comments

Sorry for asking such a simple question. But I'm not familiar with Chinese and couldn't find how to change the IDE's language to English.

I used this way: Setting icon > 设置 > 全局设置 > 语言 > English But don't know how to apply this setting!

SiavashTafazoli avatar Jul 17 '22 11:07 SiavashTafazoli

Sorry for asking such a simple question. But I'm not familiar with Chinese and couldn't find how to change the IDE's language to English.

I used this way: Setting icon > 设置 > 全局设置 > 语言 > English But don't know how to apply this setting!

You can change the default language by adding general.language: "en-US" to the defaultPreferences property of AppConfig

AppConfig is the constructor parameter of ClientApp

For example: https://github.com/opensumi/core/blob/main/packages/startup/entry/web-lite/app.tsx#L56

Aaaaash avatar Jul 18 '22 01:07 Aaaaash

Sorry for asking such a simple question. But I'm not familiar with Chinese and couldn't find how to change the IDE's language to English.

I used this way: Setting icon > 设置 > 全局设置 > 语言 > English But don't know how to apply this setting!

Global setting not work when empty project. You can change it through the following steps

  1. Open a folder by ide-electron
  2. Setting icon > 设置 > 全局设置 > 语言 > English

This is a bug that will be fixed later. 🤔️

yantze avatar Jul 19 '22 06:07 yantze

I used this code snipet and it worked (almost):

// src/browser/project.ts:

initialize() {
    setLanguageId('en-US');
    localStorage.setItem(`${PreferenceScope.User}:${'general.language'}`, 'en-US');
}

Most of the UI would be in English except this module https://github.com/opensumi/core/discussions/1332, which is considered a bug and hopefully it will got fixed soon!

mister-teddy avatar Jul 19 '22 07:07 mister-teddy