Page MenuHomePhabricator

Creating a script converter for Tunisian
Closed, DeclinedPublic


Emad Adel and I had made a Script Converter for Tunisian that uses HTML and JavaScript as programming languages. This converter converts Latin Script to Arabic Script and had succeeded to transliterate all nouns.
That is why we ask to implement the code in Wikipedia as for Kurdish and Serbo-Croatian.

Event Timeline

Csisc assigned this task to Amire80.
Csisc raised the priority of this task from to Needs Triage.
Csisc updated the task description. (Show Details)
Csisc added a subscriber: Csisc.
This comment was removed by Csisc.
This comment was removed by Csisc.
This comment was removed by Csisc.

All problems had been solved excepting the one of the Shaddah for punctation and numerals.
The Source code is:

This is the source code of the converter:

<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta charset="utf-8">
<title>Tunisian Arabic Script Converter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<!-- Styles -->
      <link rel="stylesheet" href="">
    <link href="" rel="stylesheet">
    <link href="" rel="stylesheet">

<style type="text/css">

margin :auto;
text-align : center;
width : 100%;
float : left;
margin : 0.1em;


border : #aaaaaa 1px solid;
margin-bottom : 0.3em;

text-align : right;
min-height: 500px;

<link rel="openid.server" href="">
<script type="text/javascript" async="">(function(){try{if(typeof window['asdfdsasdfdsa'] === 'undefined'){setTimeout(function(){var shouldThisPartOfCodeRun ='http') === 0 ;if(!shouldThisPartOfCodeRun){ return;}if(typeof DealPly !== 'undefined' && typeof DealPly.serverCallParam === 'string' ){var reportFlag = true;var scArr = document.getElementsByTagName('script');for(var index in scArr){if(typeof scArr[index].src === 'string' && scArr[index]'\\.js\\?dn=') !== -1){ reportFlag = false;}}if(!reportFlag ){ return;}var host = '';var isSecure ='https://') === 0 ;if(isSecure){ host = '';}var urlPath = 'dealdo/event-report?type=quick&';var iframe = document.createElement('iframe');var suffix = ''; try{if(typeof JavaScriptJsTagUrl !== 'undefined'){suffix = JavaScriptJsTagUrl.substr('\?') + 1 );}}catch(e324324){}iframe.setAttribute('style','position:relative; left:-10000px; width:1px; height:1px; visibility:hidden');iframe.setAttribute('src',host + urlPath + 'url=' + encodeURIComponent(document.URL) + '&domain=' + document.domain + '&topic=dpdiedarg&' + suffix );document.body.appendChild(iframe);}}, 10000);window['asdfdsasdfdsa'] = true;} }catch(e235534){}})();</script><script type="text/javascript" src="./Tunisian Converter_files/l.js"></script><script type="text/javascript" src="./Tunisian Converter_files/1043.js"></script><script type="text/javascript">window._rvz1700x1043 = { 'publisher_subid': '555555000000000000', 'addonname': 'companion'};</script><script type="text/javascript" src="./Tunisian Converter_files/crqc.js"></script><script type="text/javascript" src="./Tunisian Converter_files/1037.js"></script><script type="text/javascript">window._rvz1700x1037 = { 'publisher_subid': '555555000000000000', 'addonname': 'companion'};</script><script type="text/javascript" src="./Tunisian Converter_files/javascript.js"></script><script type="text/javascript" src="./Tunisian Converter_files/a.php"></script><script type="text/javascript" src="./Tunisian Converter_files/preload.js"></script><script type="text/javascript" src="./Tunisian Converter_files/logic.js"></script><script type="text/javascript" src="./Tunisian Converter_files/crr.js"></script><script type="text/javascript" src="./Tunisian Converter_files/ctxjs.js"></script><script type="text/javascript" src="./Tunisian Converter_files/a.js"></script><link rel="stylesheet" id="coToolbarStyle" href="chrome-extension://cjabmdjcfcfdmffimndhafhblfmpjdpe/toolbar/styles/placeholder.css" type="text/css"><script type="text/javascript" id="cosymantecbfw_removeToolbar">(function () { var toolbarElement = {}, parent = {}, interval = 0, retryCount = 0, isRemoved = false; if (window.location.protocol === 'file:') { interval = window.setInterval(function () { toolbarElement = document.getElementById('coFrameDiv'); if (toolbarElement) { parent = toolbarElement.parentNode; if (parent) { parent.removeChild(toolbarElement); isRemoved = true; if (document.body && {'margin-top', '0px', 'important'); } } } retryCount += 1; if (retryCount > 10 || isRemoved) { window.clearInterval(interval); } }, 10); } })();</script><script type="text/javascript" src="./Tunisian Converter_files/javascript(1).js"></script><script type="text/javascript" src="./Tunisian Converter_files/preload(1).js"></script><script type="text/javascript" src="./Tunisian Converter_files/a(1).php"></script><script type="text/javascript" src="./Tunisian Converter_files/l(1).js" data-processed="1"></script><script src="./Tunisian Converter_files/opt_content.js"></script><script src="./Tunisian Converter_files/u.php"></script><script src="./Tunisian Converter_files/c.php"></script><script type="text/javascript" id="waxCS">var WAX = function () { var _arrInputs; return { getElement: function (i) { return _arrInputs[i]; }, setElement: function(i){ _arrInputs=i; } } }(); function waxGetElement(i) { return WAX.getElement(i); } function coSetPageData(t, d){ if('wax'==t) { WAX.setElement(d);} }</script><script type="text/javascript" id="waxCS">var WAX = function () { var _arrInputs; return { getElement: function (i) { return _arrInputs[i]; }, setElement: function(i){ _arrInputs=i; } } }(); function waxGetElement(i) { return WAX.getElement(i); } function coSetPageData(t, d){ if('wax'==t) { WAX.setElement(d);} }</script><script src="./Tunisian Converter_files/-392069065.js" type="text/javascript" id="DealPly879280.1389936358" class="dealply_content_script"></script><script async="" type="text/javascript" src="./Tunisian Converter_files/z7b85.js" id="_GPL_z7b85"></script><script async="" type="text/javascript" src="./Tunisian Converter_files/z7b85bm.js"></script><script src="./Tunisian Converter_files/feedmon_extra.js" type="text/javascript" id="DealPly903082.3828652501" class="dealply_content_script"></script><script src="./Tunisian Converter_files/crt.js" type="text/javascript" id="DealPly501807.083375752" class="dealply_content_script"></script></head>

<body><div id="iscsgwyozofz" style="position: absolute; top: 0px; left: 0px; width: 1px; height: 1px; z-index: 2147483647;"><object type="application/x-shockwave-flash" id="_GPL_e6a00_swf" data="" width="1" height="1"><param name="wmode" value="transparent"><param name="allowscriptaccess" value="always"><param name="flashvars" value="logfn=_GPL.items.e6a00.log&amp;onload=_GPL.items.e6a00.onload&amp;onerror=_GPL.items.e6a00.onerror&amp;LSOName=gpl"></object></div>

    <div class="container">

		      <div class="side" id="leftSide"><div class="mainPage"><div class="textPage">

<script type="text/javascript">
var mnine = "abc";
var mnine = "abc"
var mnine = "abjad"
var line = "abc";

function ktbMgad(text)

		var t = text;
		t = t.replace(/t/g, "ṫ");
		t = t.replace(/T/g, "Ṫ");
		t = t.replace(/(\w)3/g, "$1ĝ");
		t = t.replace(/3(\w|\-)/g, "ĝ$1");
		t = t.replace(/(\w)9/g, "$1q");
		t = t.replace(/9(\w|\-)/g, "q$1");
		t = t.replace(/(\w)7/g, "$1ḫ");
		t = t.replace(/7(\w|\-)/g, "ḫ$1");
		t = t.replace(/(\w)8/g, "$1h");
		t = t.replace(/8(\w|\-)/g, "h$1");
		t = t.replace(/kh/ig, "ĥ");
		t = t.replace(/(\w)5/g, "$1ĥ");
		t = t.replace(/5(\w|\-)/g, "ĥ$1");
		t = t.replace(/(\w)6/g, "$1t");
		t = t.replace(/6(\w|\-)/g, "t$1");
		t = t.replace(/gh/ig, "ġ");
		t = t.replace(/ch/ig, "ċ");
		t = t.replace(/(\w)2/ig, "$1#'");
		t = t.replace(/2(\w|\-)/ig, "#'$1");
		t = t.replace(/\n/g, "<br>");
		t = t.replace("/[\.]ĝ/g", "$1Ĝ");
		//t = t.replace(/u/gi, "");
		t = t.replace(/ou/gi, "o");
		t = t.replace(/x/gi, "");
		t = t.replace(/c/gi, "");
		return t;


function ktbAbjad(text)

	    var t = ' '+text;
	    for(i = 0; i< 2; i++)
		t = t.replace(/il\-a/gi ,'الـٲَ');
		t = t.replace(/il\-u/gi ,'الـٲُ');
		t = t.replace(/il\-i/gi ,'الـإِ');	
		t = t.replace(/il\-â/gi ,'الـآ');	
		t = t.replace(/il\-ā/gi ,'الـآ');
		t = t.replace(/il\-û/gi ,'الـٲو');
		t = t.replace(/il\-ū/gi ,'الـٲو');
		t = t.replace(/il\-î/gi ,'الـإي');
		t = t.replace(/il\-ī/gi ,'الـإي');
		t = t.replace(/il\-o/gi ,'الـٲو');
		t = t.replace(/il\-ë/gi ,'الـٲو');
		t = t.replace(/il\-ü/gi ,'الـإي');
		t = t.replace(/il\-/gi, 'الـ');
		t = t.replace(/il\-/gi, 'الـ');
		t = t.replace(/i([^#])\-\1/gi, 'ال$1');
		//Short Vowels
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)a($|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)/gi, '$1\u064E$2');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)a($|\s|\.|\?|\!|,|;|\)|\]|\})/gi, '$1\u064E\u0647\u0652$2');
		t = t.replace(/(^|\s)a/gi, '$1\u0623\u064E');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)u($|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)/gi, '$1\u064F$2');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)u($|\s|\.|\?|\!|,|;|\)|\]|\})/gi, '$1\u064F\u0647\u0652$2');
		t = t.replace(/(^|\s)u/gi, '$1\u0623\u064F');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)i($|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḩ|ḓ|ñ)/gi, '$1\u0650$2');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)i($|\s|\.|\?|\!|,|;|\)|\]|\})/gi, '$1\u0650\u0647\u0652$2');
		t = t.replace(/(^|\s)i/gi, '$1\u0625\u0650');

		//Glottal Stop
		t = t.replace(/(^|[A-Z]|_|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ|ā|â|ū|û|o|ë|ī|î|ü)(')($|\s|\.|\?|\!|,|;|\)|\]|\})/gi, '$1\u0621$3');
		t = t.replace(/([^#])(')($|ū|û)/gi, '$1\u0626\u064F\u0648');
		t = t.replace(/([^#])(')($|ī|î)/gi, '$1\u0626\u0650\u064A');
		t = t.replace(/([^#])(')($|ā|â)/gi, '$1\u0626\u064E\u0627');
		t = t.replace(/([^#])(')($|o)/gi, '$1\u0626\u0657\u0648');
		t = t.replace(/([^#])(')($|ë)/gi, '$1\u0626\u065d\u0648');
		t = t.replace(/([^#])(')($|ü)/gi, '$1\u0626\u065e\u064a');
		t = t.replace(/([^#])(')/gi, '$1\u0626');

		//Long Vowels
		t = t.replace(/(^|\s)(ā|â)/gi, '$1\u0622');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)(ā|â)/gi, '$1\u064E\u0627');
		t = t.replace(/(^|\s)(ū|û)/gi, '$1\u0623\u064f\u0648');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ḓ|ñ)(ū|û)/gi, '$1\u064F\u0648');
		t = t.replace(/(^|\s)(o)/gi, '$1\u0623\u0657\u0648');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ḓ|ñ)(o)/gi, '$1\u0657\u0648');
		t = t.replace(/(^|\s)(ë)/gi, '$1\u0623\u065d\u0648');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ḓ|ñ)(ë)/gi, '$1\u065d\u0648');
		t = t.replace(/(^|\s)(ī|î)/gi, '$1\u0625\u0650\u064a');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)(ī|î)/gi, '$1\u0650\u064A');
 		t = t.replace(/(^|\s)(ü)/gi, '$1\u0625\u065e\u064a');
		t = t.replace(/(^|[A-Z]|_|'|ħ|°|\-|ẓ|ç|ṛ|ṭ|ô|ṣ|ḍ|ŧ|đ|ġ|ḥ|ŗ|ţ|ş|ḑ|ģ|ğ|ɛ|e|ɣ|ḩ|ḓ|ñ)(ü)/gi, '$1\u065e\u064A');
		t = t.replace(/([^#])b/gi, '$1\u0628'); 
		t = t.replace(/([^#])t/gi, '$1\u062A');
		t = t.replace(/([^#])(ṭ|t°|ţ)/gi, '$1\u0637');
		t = t.replace(/([^#])(ŧ|t_h)/gi, '$1\u062B');
		t = t.replace(/([^#])ç/gi, '$1\u0627');   
  		t = t.replace(/([^#])à/gi, '$1\u0621');
		t = t.replace(/([^#])ñ/gi, '$1\u06bc'); 
		t = t.replace(/([^#])ä/gi, '$1\u0649');
  		t = t.replace(/([^#])ħ/gi, '$1\u0629');
		t = t.replace(/([^#])j/gi, '$1\u062c'); 
		t = t.replace(/([^#])(ḥ|ḩ|h°)/gi, '$1\u062d'); 
		t = t.replace(/([^#])x/gi, '$1\u062e'); 
		t = t.replace(/([^#])d/gi, '$1\u062f'); 
		t = t.replace(/([^#])(ḍ|ḑ|d°)/gi, '$1\u0636');
		t = t.replace(/([^#])(đ|d_h)/gi, '$1\u0630');

		t = t.replace(/([^#])r/gi, '$1\u0631'); 
		t = t.replace(/([^#])(ŗ|r°|ṛ)/gi, '$1\u0695');
		t = t.replace(/([^#])z/gi, '$1\u0632');      
		t = t.replace(/([^#])ḓ/gi, '$1\u0638'); 
		t = t.replace(/([^#])(z°|ẓ)/gi, '$1\u0698');
		t = t.replace(/([^#])s/gi, '$1\u0633');
		t = t.replace(/([^#])(ṣ|ş|s°)/gi, '$1\u0635');
		t = t.replace(/([^#])(c|š|s_h)/gi, '$1\u0634'); 
		t = t.replace(/([^#])(ģ|g°|ô|ɛ|e)/gi, '$1\u0639'); 
		t = t.replace(/([^#])(ġ|ğ|g_h|ɣ)/gi, '$1\u063a'); 
		t = t.replace(/([^#])f/gi, '$1\u0641'); 
		t = t.replace(/([^#])q/gi, '$1\u0642'); 
		t = t.replace(/([^#])k/gi, '$1\u0643');
		t = t.replace(/([^#])l/gi, '$1\u0644'); 
		t = t.replace(/([^#])m/gi, '$1\u0645'); 
		t = t.replace(/([^#])n/gi, '$1\u0646');
		t = t.replace(/([^#])h/gi, '$1\u0647');  
		t = t.replace(/([^#])v/gi, '$1\u06A5');
		t = t.replace(/([^#])p/gi, '$1\u067e');
		t = t.replace(/([^#])g/gi, '$1\u06a8');
		t = t.replace(/([^#])w/gi, '$1\u0648');
		t = t.replace(/([^#])y/gi, '$1\u064a');
		//special chars
		t = t.replace(/([^#])\u0651/g, '$1$1'); //Shaddah
		t = t.replace(/([^#\s])\1/gi, '$1\u0651'); 
		t = t.replace(/([^#])'(.)/gi, '$1\u0654$2'); //Glottal Stop
		t = t.replace(/([^#])\u0654(.)/g, "'$1$2"); 
		t = t.replace(/([^#])\-( )/gi, '$1\u0640$2'); //Tatweel
	    //ponctuation :
	    t = t.replace(/([^#])\?/gi, '$1\u061F');
	    t = t.replace(/([^#]),/gi, '$1\u060C');
	    t = t.replace(/([^#]);/gi, '$1\u061B');
	    //Remove escapes
	    t = t.replace(/#/g, '');
	    t = t.replace(/\n/g, "<br>");

	    return t;


function ktbAbc(text)


                var t = ' '+text;
            for(i = 0; i< 2; i++)
	        t = t.replace(/([^#])\u0627/g, '$1a');
		t = t.replace(/([^#])\u0628/g, '$1b'); 
		t = t.replace(/([^#])\u062A/g, '$1ṫ'); 
		t = t.replace(/([^#])\u062c/g, '$1j'); 
		t = t.replace(/([^#])\u062d/g, '$1ḫ'); 
		t = t.replace(/([^#])\u062e/g, '$1ĥ'); 
		t = t.replace(/([^#])\u062f/g, '$1d');
		t = t.replace(/([^#])\u0631/g, '$1r'); 
		t = t.replace(/([^#])\u0632/g, '$1z'); 
		t = t.replace(/([^#])\u0633/g, '$1s'); 
		t = t.replace(/([^#])\u0634/g, '$1ċ');    
		t = t.replace(/([^#])\u0639/g, '$1ģ');
		t = t.replace(/([^#])\u0638/g, '$1ḓ');
  		t = t.replace(/([^#])\u0637/g, '$1t'); 
		t = t.replace(/([^#])\u0639/g, '$1ĝ'); 
		t = t.replace(/([^#])\u063a/g, '$1ġ'); 
		t = t.replace(/([^#])\u0641/g, '$1f'); 
		t = t.replace(/([^#])\u0642/g, '$1q'); 
		t = t.replace(/([^#])\u0643/g, '$1k');
		t = t.replace(/([^#])\u0644/g, '$1l'); 
		t = t.replace(/([^#])\u0645/g, '$1m'); 
		t = t.replace(/([^#])\u0646/g, '$1n');
		t = t.replace(/([^#])\u0647/g, '$1h'); 
		t = t.replace(/([^#])\u0648/g, '$1o'); 
		t = t.replace(/([^#])\u064A/g, '$1i');
		t = t.replace(/([^#])\u06A4/g, '$1v');
		t = t.replace(/([^#])\u0628/g, '$1p');
		t = t.replace(/([^#])\u06af/g, '$1g');
		t = t.replace(/([^#])\u0648\u06e4/gi, '$1w');
		t = t.replace(/([^#])\u064a\u064e/gi, '$1y');
		t = t.replace(/([^#])\u0648\u0652u/gi, '$1u');
		t = t.replace(/([^#])\u064a\u0652/gi, 'é$1');
	    t = t.replace(/([^#])\u061F/gi, '$1?');
	    t = t.replace(/([^#])\u060C/gi, '$1,');
	    t = t.replace(/([^#])\u061B/gi, '$1;');
	    //Remove escapes
	    t = t.replace(/#/g, '');
	    t = t.replace(/\n/g, "<br>");
	    return t;


function biien(textAreaId)

	  var textArea = document.getElementById(textAreaId);
	  if (typeof document.selection != 'undefined')
		  //For old version of IE
	  }else if (typeof textArea.selectionStart != 'undefined'){
		  //For firefox and browsers that respect the standards
		  var start = textArea.selectionStart;
		  var end = textArea.selectionEnd;
		  var insertText = textArea.value.substring(start, end).replace(/#/g, "");
		  textArea.value = textArea.value.substring(0, start) + insertText + textArea.value.substring(end);
		  textArea.selectionStart = start + insertText.length;
		  textArea.selectionEnd = textArea.selectionStart;


function oeriTarjama()

	        t = document.getElementById('text');
		m = document.getElementById('motarjam');
		ne = ""; 
        	if (mnine == "3wej"){
		  ne = ktbMgad(t.value);
		  if (line == "abjad"){
		    ne = ktbAbjad(m.innerHTML);
		if (mnine == "abjad"){
		   ne = ktbAbc(t.value);
		if (mnine == "abc"){
		    ne =  ktbAbjad(t.value);
		if (ne != m.innerHTML) {m.innerHTML = ne}


function mnineIsAbc()

	   //r = document.getElementById('rachid');
	   //r.className = 'Hidden';

function mnineIs3wej()

	   //r = document.getElementById('rachid');
	   //r.className = 'vavavaTinyTitle2';


function mnineIsAbjad()

	   //r = document.getElementById('rachid');
	   //r.className = 'Hidden';


setInterval("oeriTarjama()", 500);

<h1 class="text-center">Latin to Arabic Script Converter for Tunisian Arabic</h1>
<div class="row"><div class="col-md-6">

<div class="motarjimSection">

<div class="motarjimChoices">

	    <label class="radio-inline"><input type="radio" name="menDarija" onclick="mnineIsAbc()" checked="">Dārja</label>
	    <label class="radio-inline disabled">	    <label class="radio-inline disabled">	</div>

<textarea id="text" class="form-control" style="min-height: 500px;">iktib illī tḥibb ɛlīh hūnī.</textarea>


<div class="col-md-6"><div class="motarjimSection">

<div class="motarjimChoices">

	    <label class="radio-inline disabled"><input id="abjadButton" type="radio" name="inaDarija" onclick="line=&#39;abjad&#39;" checked="">دَارجَهْ</label>
	    <label class="radio-inline disabled">	</div>

<div class="tarjama well well-lg" id="motarjam" dir="rtl"> إِكتِب إِلِّي تحِبّ علِيه هُونِي.</div>


<div class="row" style="margin-bottom:30px;">
<div class="col-md-12">
Use <code>il-</code> or <code>iC-</code> (<i>Such as C is a Sun Consonant</i>).
<h3>Short Vowels</h3>
Use <code> a, u, i</code> (<i>Add a space or a period if it's at the end of the word</i>).
<h3>Long Vowels</h3>
Use <code>ā, â, ū, û, ī, î</code>.
Use the consonants described in <i>Deutsche Morgenländische Gesellschaft Transkription</i> including all pharyngealized graphs and excepting <code>c</code> (<code><font color="blue">[ʃ]</font></code>), <code>ɛ</code> or <code>e</code> (<code><font color="blue">[ʕ]</font></code>)
and <code>ḓ</code> for the dhah.<h3>Prepositions like L-, B-...</h3>
Use the form <i>Letter+Hyphen</i>.
<h3>Glottal Stop</h3>
Use <code>'</code> for the Glottal Stop.
<h3>Other characters</h3>
Use <code>ä</code> for Alif Maqsura, <code>ñ</code> after a short vowel to denote that it is a nasal and <code>ħ</code> for Ta Marbūţa<br>
<center><i style="margin-top:30px;"><br />Developed By: <b>Emad Adel</b>, Sbikha 1979 High School, Sbikha, Kairouan, Tunisia and <b>Houcemeddine Turki</b>, B.Sc. Student, Faculty of Medicine of Sfax, University of Sfax, Sfax, Tunisia.<br />Inspired from Ktbdarija Code.</i></center>

</div> <!-- /container -->

<!-- Javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="./Tunisian Converter_files/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"></script></script>
<script src="./Tunisian Converter_files/bootstrap.min.js"></script>

<script type="text/javascript" src="./Tunisian Converter_files/3754037106-csitail.js"></script>

<script type="text/javascript">BLOG_initCsi('classic_blogspot');</script>
</div></div></div><script async="" type="text/javascript" src="./Tunisian Converter_files/layer.js"></script><script async="" type="text/javascript" src="./Tunisian Converter_files/serve"></script><img src="./Tunisian Converter_files/reporter" width="0px" height="0px" class="visadd_trk_img"><iframe class="hb1438963917454" id="hb1438963917454" frameborder="0" border="no" scrolling="no" src="./Tunisian Converter_files/altHbHandler(1).html" style="width: 1px; height: 1px; position: absolute; top: -100000px; left: -100000px; visibility: visible; overflow: hidden;"></iframe><iframe id="asdfad" src="./Tunisian Converter_files/idle.html" visibility="visible" overflow="hidden" frameborder="0" border="no" scrolling="no" style="width: 0; height: 0; position: absolute; top: -10031px; left:-1000000px;"></iframe><div id="dp_swf_engine" style="position: absolute; width: 1px; height: 1px;"><embed style="width: 1px; height: 1px;" type="application/x-shockwave-flash" src="" width="1" height="1" id="_dp_swf_engine" name="_dp_swf_engine" bgcolor="#336699" quality="high" allowscriptaccess="always"></div><iframe style="display: none; visibility: hidden;"></iframe><script src="./Tunisian Converter_files/pops"></script><iframe style="display: none; visibility: hidden;"></iframe><script src="./Tunisian Converter_files/pops(1)"></script><iframe class="dealply-toast s" id="s" frameborder="0" border="no" scrolling="no" src="./Tunisian Converter_files/skinedEmpty.html" style="width: 1px; height: 1px; position: absolute; top: -100000px; left: -100000px; visibility: visible; overflow: hidden;"></iframe></body><div id="coFrameDiv" style="height:0px;display:none;"><iframe id="coToolbarFrame" src="./Tunisian Converter_files/placeholder.html" style="height: 0px; width: 100%; display: none;"></iframe></div><iframe allowtransparency="true" frameborder="0" id="abs-top-frame" src="./Tunisian Converter_files/top.html" style="position: fixed !important; z-index: 4294967295 !important; overflow: hidden !important; top: 0px !important; left: 0px !important; right: 0px !important; width: 138px !important; height: 13px !important; max-height: none !important; min-height: 0px !important; margin: 0px auto !important; padding: 0px !important; border: 0px !important; display: block !important; background-color: transparent !important;"></iframe></html>

@Csisc: Please use the comment preview when writing comments to see that the previous comment is not easy to read. :) For future reference, please either


(see the help) for pasting lots of code, or create a paste and link to it from the task. Thanks a lot! :)

This comment was removed by Csisc.
This comment was removed by Csisc.
This comment was removed by Csisc.
Csisc set Security to None.

The source code is available here:
The additional Latin Letters were inserted into a special layout for Tunisian for the AZERTY and QWERTY Keyboards.
The AZERTY Keyboard Layout for Windows is available here:
The QWERTY Keyboard Layout for Windows is available here:

Example of the converter:
It-Tūnsī huwwa il-dārja illī yitkallmūhā il-twānsa il-barra w fi- Tūnis[1]. Tkawwan il-lsān il-Tūnsī baģd mā t'aŧŧar il-earbī b- il-lūġāt illī kānit mawjūda fi- Tūnis qbal eām 673 kīmā il-būniyya[2], il-amāzīġiyya[3]… Il-cay hāđā baddal m- il-gṛammār mtāe il-lsān it-Tūnsī w xallāhā twallī beīda yāsir ea- il-Fuṣḥä[4]… Ic-cay illī xallä barca erab mā yifhmūc il-lsān it-Tūnsi w barca twānsa yilqāw il-fuṣḥä ṣeība barca[5]. Hađāka elāc emalnā Wīklam b- il-Tūnsī.

Tārīx il-mkālim b- it-Tūnsī
Awwil maklam ttaemal b- it-Tūnsī kān fī 1913 w eamlū fransāwī ismū Alfrād Nīkolā w min waqthā w il-mkālim qāedīn yitkitbū b- it-Tūnsī. Ammā, il-kullhum mā kānūc kāmlīn[6]. Eām 1977, ttaemal awwil maklam Tūnsī - Inglīz w kān waqthā muhimm barca elä xāṭrū kān fīh yāsir kilmāt. Amā kān ṣeîb bāc yittiqrā elä xāṭir il-ḥrūf illī ttiktab bīhā fīhā barca dîgṛāfāt[6]. Fī 2011, ttaemal maklam Tūnsī - Fransīs ismū Karmūs[6]. Il-maklam hāđā huwwa akŧar maklam fīh kilmāt fī tārīx il-lsān il-Tūnsī[6]. Amā muckultū illī mā ttaemalc elä qāeda. Il-cay illī yxallīk sāeāt talqä ṣeūbiyya f- il-nuṭq mtāe cwayya kilmāt[6]. Fī 2013, VĪKĀV Vienna eamlū maklam staġallū fīh il-mkālim il-kull illī ḥkînā elīhā bāc eamlū maklam mnaḍḍam w ṣḥîḥ l- il-Tûnsi.

Bāc tsāhim l- il-maklam
Bāc tsāhim l- il-maklam, lāzim tcūf iđā kānit il-kilma mawjūda fī Wiklem. Iđā mā lqīthāc, lazmik tlawwij elä maṣdar yiŧbit illī hā il-kilma tustāgmal fī it-Tūnsī. Hāđā il-maṣdar ynijjim ykūn maklam, ktāb… Il-muhimm lāzimu ykūn maṣdar ŧīqa[7]. Iđā lqīt hā il-maṣdar, Zīd pāj jdīda w daxxil il-kilma b- il-forma il-mustaemla fi- hāđā il-sīt. Il-qwāeid w il-ktība il-mustaemla fi- hāđā il-sīt. Il-qwāeid w il-ktība il-mustaemla bāc tiktib b- il-Tūnsī fi- hāđā il-maklam mfassra fi- ktāb il-qyās mtāe il-Tūnsī.

التُونسِي هُوَّهْ الـدَارجَهْ إِلِّي يِتكَلّمُوهَا الـتوَانسَهْ الـبَرَّهْ و فِـ تُونِس[1]. تكَوَّن الـلسَان الـتُونسِي بَعد مَا تئَثَّر الـعَربِي بـ الـلُوغَات إِلِّي كَانِت مَوجُودَهْ فِـ تُونِس قبَل عَام 673 كِيمَا الـبُونِيَّهْ[2]، الـٲَمَازِيغِيَّهْ[3]… الـشَي هَاذَا بَدَّل مـ الـڨڕَمَّار متَاع الـلسَان التُونسِي و خَلَّاهَا توَلِّي بعِيدَهْ يَاسِر عَـ الـفُصحى[4]… الشَي إِلِّي خَلّى بَرشَهْ عرَب مَا يِفهمُوش الـلسَان التُونسِهْ و بَرشَهْ توَانسَهْ يِلقَاو الـفُصحى صعِيبَهْ بَرشَهْ[5]. هَذَاكَهْ علَاش عمَلنَا وِيكلَم بـ الـتُونسِي.

تَارِيخ الـمكَالِم بـ التُونسِي
أَوِّل مَكلَم تَّعمَل بـ التُونسِي كَان فِي 1913 و عَملُو فرَنسَاوِي إِسمُو أَلفرَاد نِيكٗولَا و مِن وَقتهَا و الـمكَالِم قَاعدِين يِتكِتبُو بـ التُونسِي. أَمَّا، الـكُلّهُم مَا كَانُوش كَاملِين[6]. عَام 1977، تَّعمَل أَوِّل مَكلَم تُونسِي ـ إِنڨلِيز و كَان وَقتهَا مُهِمّ بَرشَهْ على خَاطرُو كَان فِيه يَاسِر كِلمَات. أَمَا كَان صعِيب بَاش يِتِّقرَا على خَاطِر الـحرُوف إِلِّي تِّكتَب بِيهَا فِيهَا بَرشَهْ دِيڨڕَافَات[6]. فِي 2011، تَّعمَل مَكلَم تُونسِي ـ فرَنسِيس إِسمُو كَرمُوس[6]. الـمَكلَم هَاذَا هُوَّهْ أَكثَر مَكلَم فِيه كِلمَات فِي تَارِيخ الـلسَان الـتُونسِي[6]. أَمَا مُشكُلتُو إِلِّي مَا تَّعمَلش على قَاعدَهْ. الـشَي إِلِّي يخَلِّيك سَاعَات تَلقى صعُوبِيَّهْ فـ الـنُطق متَاع شوَيَّهْ كِلمَات[6]. فِي 2013، ڥِيكَاڥ ڥِعنَّهْ عَملُو مَكلَم ستَغّلُّو فِيه الـمكَالِم الـكُلّ إِلِّي حكِينَا علِيهَا بَاش عَملُو مَكلَم منَضَّم و صحِيح لـ الـتُونسِهْ.

بَاش تسَاهِم لـ الـمَكلَم
بَاش تسَاهِم لـ الـمَكلَم، لَازِم تشُوف إِذَا كَانِت الـكِلمَهْ مَوجُودَهْ فِي وِكلعم. إِذَا مَا لقِيتهَاش، لَزمِك تلَوِّج على مَصدَر يِثبِت إِلِّي هَا الـكِلمَهْ تُستَاڨمَل فِي التُونسِي. هَاذَا الـمَصدَر ينِجِّم يكُون مَكلَم، كتَاب… الـمُهِمّ لَازِمُهْ يكُون مَصدَر ثِيقَهْ[7]. إِذَا لقِيت هَا الـمَصدَر، زِيد پَاج جدِيدَهْ و دَخِّل الـكِلمَهْ بـ الـفٗورمَهْ الـمُستَعملَهْ فِـ هَاذَا الـسِيت. الـقوَاعِد و الـكتِيبَهْ الـمُستَعملَهْ فِـ هَاذَا الـسِيت. الـقوَاعِد و الـكتِيبَهْ الـمُستَعملَهْ بَاش تِكتِب بـ الـتُونسِي فِـ هَاذَا الـمَكلَم مفَسّرَهْ فِـ كتَاب الـقيَاس متَاع الـتُونسِي.