From 1a0c7edebacc76a70e57dfd494e24420fa77b56b Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Tue, 18 Oct 2022 15:33:35 +0200 Subject: feat: introduce navigator.language (#12322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Link to the spec: https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-language-dev Co-authored-by: Bartek IwaƄczuk --- runtime/worker_bootstrap.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/worker_bootstrap.rs') diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index 8af78c21a..07b093e44 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -16,6 +16,7 @@ pub struct BootstrapOptions { pub cpu_count: usize, pub debug_flag: bool, pub enable_testing_features: bool, + pub locale: String, pub location: Option, /// Sets `Deno.noColor` in JS runtime. pub no_color: bool, @@ -47,6 +48,7 @@ impl Default for BootstrapOptions { enable_testing_features: Default::default(), debug_flag: Default::default(), ts_version: Default::default(), + locale: "en-EN".to_string(), location: Default::default(), unstable: Default::default(), inspect: Default::default(), @@ -63,6 +65,7 @@ impl BootstrapOptions { "cpuCount": self.cpu_count, "debugFlag": self.debug_flag, "denoVersion": self.runtime_version, + "locale": self.locale, "location": self.location, "noColor": self.no_color, "isTty": self.is_tty, -- cgit v1.2.3