The toLocaleString() method of an object returns a language-sensitive string of the object.

    
    const date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));

    const dateLocaleStringArabic = date.toLocaleString('ar-EG');

    console.log(dateLocaleStringArabic);
    // "٢٠‏/١٢‏/٢٠١٢ ٤:٠٠:٠٠ ص"


    // another, common example
    const amounts = [4, 7, 10];

    const amountsLocaleStringEuros = amounts.toLocaleString("fr", { style: "currency", currency: "EUR" });

    console.log(amountsLocaleStringEuros);
    // "4,00 €,7,00 €,10,00 €"