Skip to Content
🎲 欢迎使用 RandBox - 功能强大的 JavaScript 随机数据生成库! 了解详情

locale

// 用法 randBox.locale() randBox.locale({region: true})

生成一个随机 ISO-639-1 语言代码

randBox.locale(); => 'ca'

生成一个随机 IETF 区域代码

randBox.locale({region: true}); => 'es-EA'

注意,语言代码来自 ISO-639-1 规范 , 区域代码来自 IETF 标准 

最后更新于: