如何在JavaScript中设置语言环境,例如toLocaleUpperCase()? [英] How to set locale in JavaScript, for example for toLocaleUpperCase()?

查看:88
本文介绍了如何在JavaScript中设置语言环境,例如toLocaleUpperCase()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用JavaScript toLocaleUpperCase()方法来确保大写字母在土耳其语中正常工作.但是,我不确定将土耳其语设置为用户的语言环境.

I'd like to use the JavaScript toLocaleUpperCase() method to make sure that the capitalization works correctly for the Turkish language. I cannot be sure, however, that Turkish will be set as the user's locale.

如果我确定字符串是土耳其语,现代浏览器中是否可以在运行时设置语言环境?

Is there a way in modern browsers to set the locale in run time, if I know for sure that the string is in Turkish?

(我在考虑土耳其语时遇到了这个问题,但实际上它可以是任何其他语言.)

(I ran into this problem while thinking about Turkish, but actually it can be any other language.)

推荐答案

确实没有什么东西,但是我遇到了这个您可能会发现有用的JavaScript setlocale函数脚本.

There isn't really anything much out there but I came across this JavaScript setlocale function script that you might find useful.

这篇关于如何在JavaScript中设置语言环境,例如toLocaleUpperCase()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆