-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add webview to l10n-sample #877
Comments
I also had a question related to this topic. If I build my webviews using Webpack, would I be able to use the @vscode/l10n library from within the webview code, making calls to |
I found this blog post that goes over one way of using the @vscode/l10n library from within the webview code: In that post, the author recommends sending over the contents of I also wonder if I could directly access the localization file from the webview using Webview.asWebviewUri, which could be more performant than the postMessage approach. |
I would say at this time, there is no "recommended" way to do this. We want to light up localization for webviews in a more supported way... That's tracked here: microsoft/vscode#170919 (Notebook renderers are a form of webview) Leveraging
The other option, which I think is more common, is to localize your strings in the extension host, and then send them over to the webview localized. You can do this in many different ways. |
The l10n sample is great, and I'm trying to incorporate it into an extension. I'm wondering how to integrate the l10n API into a webview. I would like to suggest adding a webview to the l10n-sample, or otherwise to add a new sample specifically for webview-l10n
The text was updated successfully, but these errors were encountered: