gpt4 book ai didi

使用国际键盘输入印地语的 JavaScript 库

转载 作者:太空狗 更新时间:2023-10-29 12:16:58 26 4
gpt4 key购买 nike

我正在使用 HTML5AngularJS 开发一个网站。我想用印地语开发一个网站。一项要求是,即使在没有适当键盘的设备上,该站点也应允许输入梵文字母表中的文本。

以前,我热链接了一个不再可用的 Microsoft 小书签 (http://ilit.microsoft.com/Bookmarklet/Script/Hindi.js),它将从英语转换为印地语:你输入“kya”,然后得到相应的印地语字符。

您能否推荐使用此系统或其他系统执行相同操作的工具?

最佳答案

http://www.gamabhana.com/?q=node/3下载代码

解压下载的文件夹。现在你的文件夹有以下内容 enter image description here

gamabhana_js 拥有您需要的所有 js 文件。在浏览器中打开 index.html 并在文本区域中输入内容。然后你可以看到相应的印地语字体而不是英语。您可以编辑该索引文件并根据需要使用。

以下是我编辑的示例代码如果我点击印地语,我将获得印地语字体而不是英语

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


<script language="JavaScript" type="text/javascript" src="./gamabhana_js/GA1000.js"></script>
<script language="JavaScript" type="text/javascript" src="./gamabhana_js/GA0010.js"></script>
<script language="JavaScript" type="text/javascript" src="./gamabhana_js/GA0640.js"></script>
<script language="JavaScript" type="text/javascript" src="./gamabhana_js/gamabhanaLib.js"></script>
<script language="JavaScript" type="text/javascript" src="./gamabhana_js/fileio.js"></script>
<script language="JavaScript" type="text/javascript" >
gw1=null;
var hindi=false;
function myCustomOnInit()
{ try{

if(hindi==true){
gw1= new gamabhanaPhoneticHandler("elm1_ifr",'__devanagari__','__roman__','#gamabhana#');
gw1.MrAutoCor=true;
GphRegisterForMasterUpdates(gw1);
}
}
catch(e){}
}

function LanguageList_onchange() {
gw1.SetPriLanguage(document.getElementById('LanguageList1').value);
}

function arrangekbhelp()
{
document.getElementById('kbhelpdiv').style.left=(window.document.body.clientWidth-400) + "px";
if((window.document.body.clientWidth-400)<0)
document.getElementById('kbhelpdiv').style.left=0 + "px";
}
function hindi1(){
hindi=true;
myCustomOnInit();
}

function togglekbhelp()
{
arrangekbhelp();
if(document.getElementById('kbhelpdiv').style.display=='block')
document.getElementById('kbhelpdiv').style.display='none';
else
document.getElementById('kbhelpdiv').style.display='block';

return;
}
window.onresize=arrangekbhelp;

</script>



<!-- TinyMCE -->
<script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

// Theme options
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,langselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,

// Example content CSS (should be your site CSS)
content_css : "css/content.css",
oninit : "myCustomOnInit",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",

// Replace values for the template plugin
template_replace_values : {
username : "omkar",
staffid : "9383"
}
});
</script>
<!-- /TinyMCE -->

</head>
<body>

<form>

<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"> </textarea>

</form>
<button onclick="hindi1()">Hindi</button>


</body>

</html>

关于使用国际键盘输入印地语的 JavaScript 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21378693/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com