CultureInfo in JavaScript

前端 未结 3 1404
轮回少年
轮回少年 2021-01-11 11:26

In c# I use the below method in order to get the CultureInfo.

System.Globalization.CultureInfo.CurrentCulture.Name // output :en-US

Can any

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-11 11:40

    This is a very old post an is definately in need of an update. All major browsers now support the navigator property. Simply use

    var lang = navigator.language
    

提交回复
热议问题