Good day everyone!
I created VS Code extension and there is need for a current display language of VS Code UI for a WebView panel localization. I haven't found any straight API to access this info.
However I found a solution that is written below. But I want to keep localization data for WebView relatively to it, not keep it at the root of extension, because I build separate app for WebView. For that I'd be nice to use VS Code API to pass info about current display language.
Any thoughts will be appreciated!
Good day everyone!
I created VS Code extension and there is need for a current display language of VS Code UI for a WebView panel localization. I haven't found any straight API to access this info.
However I found a solution that is written below. But I want to keep localization data for WebView relatively to it, not keep it at the root of extension, because I build separate app for WebView. For that I'd be nice to use VS Code API to pass info about current display language.
Any thoughts will be appreciated!
Share Improve this question asked Feb 3 at 10:17 Fosfor15Fosfor15 114 bronze badges1 Answer
Reset to default 0I have found a workaround in a way to use a localization vscode.l10n.bundle
or vscode.l10n.uri
, extract from it a needed information about current display language and even pass a ready-to-use localization vscode.l10n.bundle
to WebView by webview.postMessage
method.