Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Detect Browser UI Language</title> </head> <body> <script> function checkLanguage() { alert("Your browser's UI language is: " + navigator.language); } </script> <button type="button" onclick="checkLanguage();">Check Language</button> </body> </html>