VSCode API Display Language detection

16 Views Asked by At

Want to know is there any API available by which we can identify what display language is set in VSCode?

I tried looking into docs and google but didn't find any answers.

When i am opening webview it is still showing en language even though the VSCode display language is FR.

1

There are 1 best solutions below

1
Dario.Casciato On

I haven't tried it, but this should work to get the current language:

const vscode = require('vscode');

let uiLanguage = vscode.env.language;
console.log(uiLanguage);