diff --git a/source/net/filebot/ui/GettingStartedStage.java b/source/net/filebot/ui/GettingStartedStage.java index 3eb45123..3ca00ef9 100644 --- a/source/net/filebot/ui/GettingStartedStage.java +++ b/source/net/filebot/ui/GettingStartedStage.java @@ -5,6 +5,7 @@ import static net.filebot.Settings.*; import java.awt.Desktop; import java.lang.reflect.Field; import java.net.URI; +import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; @@ -75,6 +76,9 @@ public class GettingStartedStage { // force black background while page is loading setBackground(webview.getEngine(), 0xFF000000); + + // make sure that we can read the user locale in JS + webview.getEngine().executeScript(String.format("navigator.locale = '%s'", Locale.getDefault())); } public void show() { diff --git a/website/getting-started/index.js b/website/getting-started/index.js index f88e2716..fd64f0ae 100644 --- a/website/getting-started/index.js +++ b/website/getting-started/index.js @@ -49,7 +49,7 @@ function getData() { }] var links = location.hash.length > 0 - var youtube = !(/zh(.CN)?/i).test(navigator.language) // YouTube is blocked in China (mainland) + var youtube = !(/zh(.CN)?/i).test(navigator.locale ? navigator.locale : navigator.language) // YouTube is blocked in China (mainland) if (links) { data = data.slice(0, 5) // use only tutorial images