更改客户端编程语言中的键盘语言 [英] change keyboard language in client-side programming languages
问题描述
我想要重点关注输入元素更改键盘语言。
有一种方法来更改客户端编程语言中的键盘语言?
有一种方法来更改键盘javascript中的语言?
I want to focus in input element change keyboard language.
is there a way to change keyboard language in client-side programming languages ?
is there a way to change keyboard language in javascript ?
推荐答案
浏览器无法强制操作系统对键盘使用其他语言
The browser has no ability to force the operating system to use a different language for the keyboard.
您可以做的最好的是设置页面的语言(例如< html lang ='fr'>
使用此列表中的代码)和如果需要,操作系统将会更改语言。
The best you can do is set the language for the page (e.g. <html lang='fr'>
using codes from this list) and the OS will change the language if it wants to.
例如,在OSX上,在系统偏好设置>中有一个设置。键盘>输入源
调用自动切换到文档的输入源
,如果用户希望键盘切换到文档语言,则会切换。
For example, on OSX, there is a setting in System Preferences > Keyboard > Input Sources
called Automatically switch to a document's input source
that will toggle if the user wants the keyboard to switch to the documents language.
这篇关于更改客户端编程语言中的键盘语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!