最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - How to get display language in VS Code UI directly by its API? - Stack Overflow

programmeradmin0浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

I 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.

发布评论

评论列表(0)

  1. 暂无评论