You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, Electron now receives the application locale so that it can display the window controls overlay component properly.
As a result, the platform.locale variable actually represents the system language, and the platform.language variable represents the application language.
It turns out many parts of VS Code actually want to use the application language when localizing certain strings such as dates. Therefore, many parts of the program have been changed to use platform.language instead of platform.locale. On Windows, the app.getPreferredSystemLanguages() code path was enabled again to help fetch platform.locale for language recommendation.
Steps for Windows and Linux
Switch the system language to French or another language for which we have a language pack available. On Windows, change that language to be the first preferred language instead (which differs from the system language). If more "precise" language options such as "French (Canada)" are available, switch to that instead. Reboot the system if prompted.
Launch Insiders with a fresh user data and extensions dir.
There should be a notification alerting users that they can install and change the application language to the language in step 1.
Accept the notification.
Run the "Preferences: Configure Runtime Arguments" command to open argv.json.
The locale key should have a language code as the value. The language code should be one of the options available in the quickpick when one runs the "Configure Display Language" command. For example, "fr" is a valid locale key, but "fr-ca" should not appear. Another example is that "zh-cn" is a valid locale key, but "zh-hans-cn" should not appear.
Open the extensions viewlet and view some extensions. The extension pages should load without issue. Dates such as the last updated date should be formatted properly, i.e. formatted in a way expected for the given application language.
Additional steps for Windows
Switch the system language and the first preferred language to a right-to-left language like Arabic. Reboot the system.
Launch Insiders.
The close button should still be on the right side of the window, regardless of the current language pack.
Steps for macOS
Run the "Preferences: Configure Runtime Arguments" command to open argv.json.
Set the locale value to "fr" or another language code that shows up when running the "Configure Display Languages" command.
Make sure the French language pack is not installed.
Switch the system language to a language with no official language pack support such as Arabic. Also make sure in the language settings under the Applications tab that VS Code Insiders doesn't have a custom language assigned to it there. Reboot the system.
Open VS Code Insiders again.
VS Code Insiders should be in the language set in step 2.
Open the extensions viewlet and view some extensions. The extension pages should load without issue. Dates such as the last updated date should be formatted properly, i.e. formatted in a way expected for the given application language.
The text was updated successfully, but these errors were encountered:
I don't know if fully tested it since I don't see the notification, but everything else worked ok. For example it accepted es-mx in argv.json rather than just es
Refs: #169114
Complexity: 3
Authors: @rzhao271, @TylerLeonhardt
Create Issue
On Windows, Electron now receives the application locale so that it can display the window controls overlay component properly.
As a result, the
platform.locale
variable actually represents the system language, and theplatform.language
variable represents the application language.It turns out many parts of VS Code actually want to use the application language when localizing certain strings such as dates. Therefore, many parts of the program have been changed to use
platform.language
instead ofplatform.locale
. On Windows, theapp.getPreferredSystemLanguages()
code path was enabled again to help fetchplatform.locale
for language recommendation.Steps for Windows and Linux
argv.json
.locale
key should have a language code as the value. The language code should be one of the options available in the quickpick when one runs the "Configure Display Language" command. For example, "fr" is a validlocale
key, but "fr-ca" should not appear. Another example is that "zh-cn" is a validlocale
key, but "zh-hans-cn" should not appear.Additional steps for Windows
Steps for macOS
argv.json
.The text was updated successfully, but these errors were encountered: