Enable Your Website To Write In Hindi, Marathi, Kannada, Urdu…


We at C-DAC Mumbai, have developed a Transliteration tool ‘Xlit’  to write in Indian Languages; currently the system supports Hindi, Kannada and Urdu.

Xlit : It is a framework which can be used for developing transliteration system for any language pair provided the bilingual corpus of names/words is available for that language pair (for training), This system is developed using statistical learning technique.

The system can be used for enabling local languages support on websites.

Use following steps to enable your website for Writing in Hindi, Kannada and Urdu…

Step1: Download the following files 

Step2:  Include the downloaded file in your webpage as following 

<script type="text/javascript" src="./jquery-latest.js" ></script>
<script type="text/javascript" src="./xhr.js"> </script>;

Step3: Write a java-script in your page as following
Use setTargetLanguage(“hin”); for setting the target (output) language eg. hin for Hindi
Use setSourceLanguage(“eng”);
for setting the target (input) language eg. eng for English

Now use class xlitfield where you want to enalbe the writing in local language like Hindi, Kannada or Urdu; see the example below.

<!DOCTYPE html>
<html>
<head>
		<link rel=stylesheet type="text/css" href="./xhr.css">
<script type="text/javascript" src="./jquery-latest.js"></script>
<script type="text/javascript" src="./xhr.js"></script>
<script type="text/javascript">
 setTargetLanguage("hin"); // Hind: 'hin' , Urdu: 'ud', Kannada: 'kn'
 setSourceLanguage("eng");
});
</script>
</head>
<body>
<div>
 <span>Enter your word :
 <input id="textfield1" class="xlitfield" type="text" name="word" />
 </span>

 Enter your text: 

 <textarea id="textarea" class="xlitfield" name="testing" rows="10" columns="20"> </textarea></div>
</body>
</html>

Screenshot of the above code

Please feel free to comment, suggest and share ….

— धन्यवाद, ಧನ್ಯವಾದ, دھانیواد

Advertisements

Create a free website or blog at WordPress.com.

%d bloggers like this: