Add display language support This likely needs tweaking if we want to upstream. Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/server/node/serverServices.ts +++ code-server/lib/vscode/src/vs/server/node/serverServices.ts @@ -198,6 +198,9 @@ export async function setupServerService const channel = new ExtensionManagementChannel(extensionManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)); socketServer.registerChannel('extensions', channel); + const localizationsChannel = ProxyChannel.fromService(accessor.get(ILocalizationsService)); + socketServer.registerChannel('localizations', localizationsChannel); + const encryptionChannel = ProxyChannel.fromService(accessor.get(IEncryptionMainService)); socketServer.registerChannel('encryption', encryptionChannel); Index: code-server/lib/vscode/src/vs/base/common/platform.ts =================================================================== --- code-server.orig/lib/vscode/src/vs/base/common/platform.ts +++ code-server/lib/vscode/src/vs/base/common/platform.ts @@ -83,6 +83,17 @@ if (typeof navigator === 'object' && !is _isWeb = true; _locale = navigator.language; _language = _locale; + + const el = typeof document !== 'undefined' && document.getElementById('vscode-remote-nls-configuration'); + const rawNlsConfig = el && el.getAttribute('data-settings'); + if (rawNlsConfig) { + try { + const nlsConfig: NLSConfig = JSON.parse(rawNlsConfig); + _locale = nlsConfig.locale; + _translationsConfigFile = nlsConfig._translationsConfigFile; + _language = nlsConfig.availableLanguages['*'] || LANGUAGE_DEFAULT; + } catch (error) { /* Oh well. */ } + } } // Native environment Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html =================================================================== --- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench.html +++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench.html @@ -23,6 +23,9 @@ + + + @@ -38,6 +41,27 @@