View Full Version : دستیابی به زبان سیستم
olampiad
دوشنبه 30 تیر 1393, 16:48 عصر
سلام و خسته نباشید
چ طور میتونم به زبان نوشتاری، سیستم دسترسی داشته باشم.
من میخوام زمانی که روی دایو کلیک کرد زبان سیستم رو بر گردونه.
آیا واسه این کار تابعی وجود دارد؟
ممنون
مهرداد سیف زاده
دوشنبه 30 تیر 1393, 17:35 عصر
http://stackoverflow.com/questions/9664034/how-to-determine-the-language-of-keyboard-input-using-jquery
http://stackoverflow.com/questions/8892238/detect-keyboard-layout-with-javascript
http://stackoverflow.com/questions/4402849/get-the-current-keyboard-layout-language-in-javascript
olampiad
چهارشنبه 01 مرداد 1393, 11:35 صبح
سلام به این کد ی نگا بندازید
var lastKeyPressed = 0;
function sendKey()
{
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.SendKeys( 'a' );
}
function getCurLayout()
{
sendKey();
setTimeout("lastKeyLang()",10);
}
function lastKeyLang()
{
if( lastKeyPressed == 97 )
alert( 'EN' );
else
alert( 'HE' );
}
document.onkeypress = saveLastKey;
function saveLastKey()
{
lastKeyPressed = window.event.keyCode;
}
من این رو نوشتم ولی بازم کار نکرد.
زبان سیستم رو بر نمیگردونه
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.