Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change the language? #35

Open
SiavashTafazoli opened this issue Jul 17, 2022 · 3 comments
Open

How can I change the language? #35

SiavashTafazoli opened this issue Jul 17, 2022 · 3 comments

Comments

@SiavashTafazoli
Copy link

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!

@Aaaaash
Copy link
Member

Aaaaash commented Jul 18, 2022

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

@yantze
Copy link
Member

yantze commented Jul 19, 2022

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. 🤔️

@mister-teddy
Copy link

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 opensumi/core#1332, which is considered a bug and hopefully it will got fixed soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants