Do all international browsers display the exception STACK in English or in the browser’s native language?

This question is NOT about translating the content of a web page. It is about the Exceptions thrown in the JavaScript engine.

I am wondering if all international installations of browsers, installed on international OSs, produce the exception STACK in english or in the native language.

I am NOT asking about any of the following:

  • Translating a web page.
  • The runtime language choice of a web page.

I am asking about a different language install of the browser where all of the UI in the browser is in the installed language including the menus, etc.

For example in the English Chrome browser I get an exception stack like this:

myState.js:10 Uncaught TypeError: Cannot read properties of undefined (reading 'stack')
    at new MyStateError (myState.js:10:17)
    at createState (myState.js:22:11)
    at statetest.html:16:23

Will it be the same for a French or Spanish installed browser? Or will the French installed version look like this:

myState.js:10 Non capturé TypeError : Impossible de lire les propriétés d'une valeur indéfinie (lecture de 'stack')
    à new MyStateError (myState.js:10:17)
    à créerÉtat (myState.js:22:11)
    à statetest.html:16:23

I don’t have a second machine on which I can install a different language OS and browser. Can someone that has a non-English install of a browser let me know what they get. (Again I am not concerned with page translations, I am looking for someone that has a full Non-English language version installed on a non-English OS)

You can run these lines of code in Dev Tools to find out:

let a = new Error('Testing');
console.log(a.stack)

UPDATE (2024-12-19)

I do not understand why people downvote and request to close a VALID QUESTION!! I am working on some code and I need to understand how the Exception Stack will be generated for browsers that are not running in English. I did figure it out thanks to a suggestion by @traktor and I will post it below.

1

This answer describes Firefox behavior. It may or may not apply to browsers in general.

  • under settings, scroll down to the language section.
  • choose a language other than your default, adding a new one if needed, but pick one that you can recognize the words for “settings” and “language” to revert the change later.
  • Firefox chrome (menus and presentation that uses text rather than icons) changes to the language chosen. E.G. for French, items listed in the hamburger menu and their associated pages were presented in Français, along with right click menus in French and invitations to translate English language web pages.

Errors in English, with help

Syntax errors were still reported on the console in English. However, a help link was added to console output: [en savoir plus] linking to a page on the French version of MDN explaining the error reported in English. Example

let x = 1;
let x = 2;

generated console output of

Uncaught SyntaxError: redeclaration of let x

[en savoir plus]:

Note

The en savoir plus link contains URL parameters of unknown usage:

    ?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default)

While I suspect other major browsers probably do something similar, without testing additional browsers I can’t say for certain. If you already know they don’t, you could always suggest Firefox to your friend.

0

First, than you @Traktor. Your suggestion lead me to accidentaly tell my Mac that I wanted to switch the default OS language to French and that allowed me to test this easily.

I hope that someone else also finds this information useful.

Here is my test code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<script>
  function one() {
    try {
      two();
    }

    catch(ex) {
      console.log(ex.stack);
    }
  }

  function two() {
    three();
  }
  function three() {
    throw new Error('asd')
  }
</script>
<button onclick="one()">Click me!!!</button>
</body>
</html>

And my results from Chrome, Firefox and Safari are below. I will text on Edge, Android and IOS later, but I hope those are similar.

International Exception Stack Text:

Below is the value of ex.stack:

Chrome:

  • English:

    Error: asd
       at three (test1.html:26:11)
       at two (test1.html:23:5)
       at one (test1.html:12:7)
       at HTMLButtonElement.onclick (test1.html:29:25)
    
  • French:

    Error: asd
      at three (test1.html:26:11)
      at two (test1.html:23:5)
      at one (test1.html:12:7)
      at HTMLButtonElement.onclick (test1.html:29:25)
    

Firefox:

  • English:

    three@http://localhost:8888/I18NExceptions/test1.html:28:11
    two@http://localhost:8888/I18NExceptions/test1.html:25:5
    one@http://localhost:8888/I18NExceptions/test1.html:12:7
    onclick@http://localhost:8888/I18NExceptions/test1.html:1:1
    
  • French:

    three@http://localhost:8888/I18NExceptions/test1.html:26:11
    two@http://localhost:8888/I18NExceptions/test1.html:23:5
    one@http://localhost:8888/I18NExceptions/test1.html:12:7
    onclick@http://localhost:8888/I18NExceptions/test1.html:1:1
    

Safari:

  • English:
    three@http://localhost:8888/I18NExceptions/test1.html:28:20
    two@http://localhost:8888/I18NExceptions/test1.html:25:10
    one@http://localhost:8888/I18NExceptions/test1.html:12:10
    onclick@http://localhost:8888/I18NExceptions/test1.html:31:4
    
  • French:
    three@http://localhost:8888/I18NExceptions/test1.html:28:20
    two@http://localhost:8888/I18NExceptions/test1.html:25:10
    one@http://localhost:8888/I18NExceptions/test1.html:12:10
    onclick@http://localhost:8888/I18NExceptions/test1.html:31:4
    

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật