-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
270 additions
and
1,738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//var path = "../dist/"; | ||
var path = "https://unpkg.com/jslingua@latest/dist/"; | ||
|
||
function addScript(name){ | ||
document.write('<script type="text/javascript" src="' + path + name + '"><\/script>'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Language test</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="use/pure-min.css"> | ||
<link rel="stylesheet" href="use/grids-responsive-min.css"> | ||
<link rel="stylesheet" href="use/jslingua.css"> | ||
|
||
<script type="text/javascript" src="call.js"></script> | ||
<script type="text/javascript"> | ||
addScript("jslingua.min.js"); | ||
addScript("info.min.js"); | ||
addScript("ara.info.min.js"); | ||
addScript("jpn.info.min.js"); | ||
</script> | ||
|
||
<script type="text/javascript"> | ||
|
||
function loading(){ | ||
var e = document.getElementById("l"); | ||
|
||
var langIDs = JsLingua.serviceLanguages("Info"); | ||
var i; | ||
for (i = 0; i < langIDs.length; i++){ | ||
var option = document.createElement("option"); | ||
option.text = langIDs[i]; | ||
e.add(option); | ||
} | ||
|
||
update(); | ||
|
||
} | ||
|
||
function setTester (){ | ||
var e = document.getElementById("l"); | ||
var langID = e.options[e.selectedIndex].text; | ||
var LangClass = JsLingua.getService("Lang", langID); | ||
tester = new LangClass(); | ||
cs = tester.availableCharSets(); | ||
} | ||
|
||
function update(){ | ||
var e = document.getElementById("l"); | ||
var langID = e.options[e.selectedIndex].text; | ||
var LangClass = JsLingua.getService("Info", langID); | ||
var info = new LangClass(); | ||
|
||
document.getElementById("name").innerHTML = info.getName(); | ||
document.getElementById("family").innerHTML = info.getFamily(); | ||
document.getElementById("branch").innerHTML = | ||
(info.getBranch() === "")? "None": info.getBranch(); | ||
document.getElementById("dir").innerHTML = | ||
(info.getDir() === "rtl")? "Right to Left": "Left to Right"; | ||
document.getElementById("wo").innerHTML = | ||
info.getWordOrder().replace("s", "Subject ").replace("o", "Object ").replace("v", "Verb "); | ||
document.getElementById("pop").innerHTML = info.getPopulation() + " persons"; | ||
document.getElementById("loc").innerHTML = info.getLocations().join(", "); | ||
document.getElementById("dia").innerHTML = info.getDialects(). join(", "); | ||
|
||
} | ||
|
||
function htmlEntities(str) { | ||
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); | ||
} | ||
|
||
</script> | ||
|
||
</head> | ||
<body> | ||
<div class="pure-menu pure-menu-horizontal pure-menu-fixed"> | ||
<a class="pure-menu-heading" href="index.html">home</a> | ||
</div> | ||
|
||
|
||
<div class="content-wrapper"> | ||
<div class="content pure-g"> | ||
|
||
<div class="pure-u-1"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Language</legend> | ||
<label>Choose the language:</label> | ||
<select id="l" class="k-select" onchange="update()"> | ||
</select> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Language name</legend> | ||
<div id="name"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Language family</legend> | ||
<div id="family"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Language branch</legend> | ||
<div id="branch"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Writing direction</legend> | ||
<div id="dir"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Words order</legend> | ||
<div id="wo"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Native speakers approx.</legend> | ||
<div id="pop"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Official in</legend> | ||
<div id="loc"></div> | ||
</fieldset> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3"> | ||
<fieldset class="k-fieldset"> | ||
<legend>Dialects</legend> | ||
<div id="dia"></div> | ||
</fieldset> | ||
</div> | ||
|
||
|
||
|
||
</div> | ||
|
||
<div class="footer"> | ||
<div class="footer-vcenter"> | ||
Copyright 2016 Abdelkrime Aries. | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
loading(); | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.