Get rid of a redundant directory level.
This commit is contained in:
BIN
projects/jap/header.png
Normal file
BIN
projects/jap/header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
projects/jap/header.xcf
Normal file
BIN
projects/jap/header.xcf
Normal file
Binary file not shown.
140
projects/jap/index.php
Normal file
140
projects/jap/index.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
$files=scandir(".");
|
||||
$fn=sizeof($files);
|
||||
for ($i=0;$i<$fn;$i++) {
|
||||
$link=$files[$i];
|
||||
|
||||
$no=false;
|
||||
if (is_dir($link) && $link!="." && $link!="..") {
|
||||
if (file_exists($link."/index.php")) $rlink=$link."/index.php";
|
||||
else if (file_exists($link."/index.htm")) $rlink=$link."/index.htm";
|
||||
else $no=true;
|
||||
if (!$no) {
|
||||
$fo=fopen($rlink,"r");
|
||||
$fr=fread($fo,filesize($rlink));
|
||||
fclose($fo);
|
||||
$fr=explode("<title>",$fr);
|
||||
$fr=explode("</title>",$fr[1]);
|
||||
$title=$fr[0];
|
||||
$sites.="<a href='".$link."' style='background-image:url(".$link.".png)'>".$title."</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3c.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Japanese Section</title>
|
||||
<style type='text/css'>
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
body {
|
||||
background:#eee;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width:700px;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
width:700px;
|
||||
height:100px;
|
||||
margin-bottom:5px;
|
||||
background:#fff url(header.png) no-repeat;
|
||||
}
|
||||
|
||||
#content {
|
||||
width:690px;
|
||||
padding:5px 5px 20px 5px;
|
||||
background:#fff;
|
||||
font:14px arial;
|
||||
float:left;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#apps {
|
||||
width:690px;
|
||||
float:left;
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
#apps a:link, #apps a:visited {
|
||||
width:211px;
|
||||
height:144px;
|
||||
margin:0 0 10px 10px;
|
||||
padding:3px;
|
||||
float:right;
|
||||
background:#ddd;
|
||||
opacity:.7;
|
||||
filter:alpha(opacity=70);
|
||||
-moz-opacity:.7;
|
||||
display:block;
|
||||
color:#0000ff;
|
||||
text-decoration:none;
|
||||
position:relative;
|
||||
text-align:right;
|
||||
z-index:2;
|
||||
}
|
||||
|
||||
#apps a:hover {
|
||||
background:#ccc;
|
||||
opacity:1;
|
||||
filter:alpha(opacity=100);
|
||||
-moz-opacity:1;
|
||||
color:#0000aa;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font:normal 24px georgia;
|
||||
margin:15px 0 10px 0;
|
||||
text-align:right;
|
||||
border-bottom:1px solid #000;
|
||||
}
|
||||
|
||||
.i {
|
||||
display:inline;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom:4px;
|
||||
}
|
||||
|
||||
p a:link, p a:visited {
|
||||
color:#0000ff;
|
||||
text-decoration:none;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
p a:hover {
|
||||
background-color:#eee;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='wrapper'>
|
||||
<div id='header'></div>
|
||||
<div id='content'>
|
||||
<h1>Introduction</h1>
|
||||
Japanese is an odd language, yet a language spoken by 130 million people. While languages in Europe generally have some similarities, the only thing Japanese has in common with i.e. English is a few loan words. It doesn't have an alphabet like most languages do, but instead it uses a tremendous amount of signs, known as <div class='i'>kanji</div>, <div class='i'>hiragana</div> and <div class='i'>katakana</div>. It's pretty confusing if you don't know Japanese. Which I don't.<br /><br />
|
||||
Well, I've been fiddling with creating some "web apps" with focus on the Japanese language, and you can find those at this page. I've also put up some links to informative sites which in more detail explain the oddity that is Japanese.
|
||||
|
||||
<h1>Web apps</h1>
|
||||
<div id='apps'>
|
||||
<?php echo $sites; ?>
|
||||
</div>
|
||||
<h1>Links</h1>
|
||||
<p><a href='http://en.wikipedia.org/wiki/Hiragana'>Wikipedia's article on hiragana. Includes table with all hiragana signs.</a></p>
|
||||
<p><a href='http://en.wikipedia.org/wiki/Katakana'>Wikipedia's article on katakana. Includes table with all katakana signs.</a></p>
|
||||
<p><a href='http://www.tanos.co.uk/jlpt/'>Various Japanese learning ressources. Includes link to a great text editor / dictionary called "JWPce".</a></p>
|
||||
<p><a href='http://www.tokyowithkids.com/fyi/hiragana_chart.html'>A hiragana table for people who doesn't have support for Japanese signs in their browser.</a></p>
|
||||
<p><a href='http://www.tokyowithkids.com/fyi/katakana_chart.html'>A katakana table for people who doesn't have support for Japanese signs in their browser.</a></p>
|
||||
<p><a href='http://www.ajalt.org/sj/sit/sit_index.html'>If you're planning on taking a trip to Japan, the situational conversations on this site may be a good start.</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
projects/jap/kanaverter.png
Normal file
BIN
projects/jap/kanaverter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
projects/jap/kanaverter/bak/logo.xcf
Normal file
BIN
projects/jap/kanaverter/bak/logo.xcf
Normal file
Binary file not shown.
30
projects/jap/kanaverter/bak/t.txt
Normal file
30
projects/jap/kanaverter/bak/t.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
function convert_value(str,from,to) {
|
||||
strlen=str.length
|
||||
cstart=0
|
||||
ftxt=""
|
||||
for (i=0;i<strlen;i++) {
|
||||
clen=i-cstart+1
|
||||
ctxt=str.substr(cstart,clen)
|
||||
cctxt=str.substr(cstart+1,1)
|
||||
maybe=false
|
||||
for (ii=0;ii<rhiradbl;ii++) {
|
||||
crhiradb=rhiradb[ii]
|
||||
if (crhiradb==ctxt) {
|
||||
ftxt+=""+r_hiradb[ctxt]+";"
|
||||
cstart=i+1
|
||||
maybe=true
|
||||
}
|
||||
else if (crhiradb.substr(0,clen)==ctxt) {
|
||||
maybe=true
|
||||
}
|
||||
}
|
||||
if (!maybe) {
|
||||
document.title=ctxt
|
||||
//ftxt+=cctxt
|
||||
cstart=i
|
||||
}
|
||||
}
|
||||
//if (strlen>cstart) ftxt+=ctxt
|
||||
ftxt=html_entity_decode(ftxt)
|
||||
return ftxt
|
||||
}
|
||||
511
projects/jap/kanaverter/index.htm
Normal file
511
projects/jap/kanaverter/index.htm
Normal file
@@ -0,0 +1,511 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3c.org/1999/xhtml">
|
||||
<head>
|
||||
<title>kanaverter [JavaScript]</title>
|
||||
<style type='text/css'>
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#box {
|
||||
background:#f5f5f5 url(logo.png) no-repeat 2px 4px;
|
||||
width:490px;
|
||||
height:250px;
|
||||
padding:50px 5px 0 5px;
|
||||
position:absolute;
|
||||
left:50%;
|
||||
top:50%;
|
||||
margin-left:-251px;
|
||||
margin-top:-151px;
|
||||
border:1px solid #999;
|
||||
}
|
||||
|
||||
#box div {
|
||||
width:240px;
|
||||
height:245px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#romaji_container {
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
#kana_container {
|
||||
}
|
||||
|
||||
#box div textarea {
|
||||
font:12px arial;
|
||||
border:1px solid #ddd;
|
||||
width:232px;
|
||||
padding:3px;
|
||||
height:208px;
|
||||
background:#fff;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
#box div div textarea {
|
||||
height:80px;
|
||||
margin-bottom:5px;
|
||||
}
|
||||
|
||||
#hirakata {
|
||||
display:none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font:normal 20px georgia;
|
||||
margin-top:5px;
|
||||
padding-left:3px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
h1:hover {
|
||||
background:#ddd;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font:normal 14px georgia;
|
||||
}
|
||||
|
||||
#box #wl {
|
||||
position:absolute;
|
||||
top:5px;
|
||||
right:5px;
|
||||
color:#0000ff;
|
||||
font:12px arial;
|
||||
cursor:pointer;
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:none;
|
||||
}
|
||||
|
||||
#box #wl #wn {
|
||||
position:absolute;
|
||||
top:20px;
|
||||
right:0;
|
||||
font:12px arial;
|
||||
width:478px;
|
||||
padding:5px;
|
||||
border:1px solid #000;
|
||||
height:auto;
|
||||
float:none;
|
||||
color:#000;
|
||||
background:#fff;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#box #wl:hover #wn {
|
||||
display:block;
|
||||
}
|
||||
</style>
|
||||
<!--[if IE]>
|
||||
<style type='text/css'>
|
||||
#box div textarea {
|
||||
margin-top:-1px;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<script type='text/javascript'>
|
||||
function is_array(obj) {
|
||||
return obj.constructor==Array
|
||||
}
|
||||
|
||||
function ctitle(where,title) {
|
||||
nodes=eval(where+"_div").childNodes
|
||||
nodes_length=nodes.length
|
||||
for (var i=0;i<nodes_length;i++) {
|
||||
node=nodes[i]
|
||||
if (node.nodeName=="H1") node.innerHTML=title
|
||||
}
|
||||
}
|
||||
|
||||
function kanaside(what) {
|
||||
nodes=kana_div.childNodes
|
||||
nodes_length=nodes.length
|
||||
for (var i=0;i<nodes_length;i++) {
|
||||
node=nodes[i]
|
||||
if (node.nodeName=="TEXTAREA") node.style.display=visibility_action[oppo[what]]
|
||||
}
|
||||
hk_div.style.display=visibility_action[what]
|
||||
}
|
||||
|
||||
function pblur(what) {
|
||||
if (what==infocus) {
|
||||
if (what=="romaji") romaji_input=romaji_text.value
|
||||
else if (what=="kana") romaji_output=romaji_text.value
|
||||
}
|
||||
else {
|
||||
if (what=="romaji") romaji_output=romaji_text.value
|
||||
}
|
||||
}
|
||||
|
||||
function bpfocus(what,detail) {
|
||||
if (detail===undefined) detail=what
|
||||
if (eval(detail+"_text").value=="") pfocus(what)
|
||||
else if (what!=infocus) eval(detail+"_text").select()
|
||||
}
|
||||
|
||||
function pfocus(what) {
|
||||
if (what!=infocus) {
|
||||
whatnot=oppo[what]
|
||||
ctitle(what,what.substr(0,1).toUpperCase()+what.substr(1)+" (input)")
|
||||
ctitle(whatnot,whatnot.substr(0,1).toUpperCase()+whatnot.substr(1)+" (output)")
|
||||
kanaside(what)
|
||||
tfocus(what)
|
||||
}
|
||||
}
|
||||
|
||||
function tfocus(what) {
|
||||
whatnot=oppo[what]
|
||||
eval(what+"_text").focus()
|
||||
if (what=="kana") romaji_text.value=romaji_output
|
||||
else if (what=="romaji") romaji_text.value=romaji_input
|
||||
infocus=what
|
||||
}
|
||||
|
||||
function html_entity_decode(str) {
|
||||
ta=document.createElement("textarea")
|
||||
ta.innerHTML=str.replace(/</g,"<").replace(/>/g,">")
|
||||
return ta.value
|
||||
}
|
||||
|
||||
function convert_value(str,from,to) {
|
||||
var strlen=str.length
|
||||
var ftxt=""
|
||||
if (to=="hira" || to=="kata") {
|
||||
var ostr=str
|
||||
var str=str.toLowerCase()
|
||||
var ttxt=""
|
||||
var ottxt=""
|
||||
var ctxt
|
||||
var octxt
|
||||
var cctxt
|
||||
var occtxt
|
||||
var maybe
|
||||
var ad
|
||||
var crkanadb
|
||||
for (var i=0;i<strlen;i++) {
|
||||
ctxt=str.substr(i,1)
|
||||
octxt=ostr.substr(i,1)
|
||||
cctxt=ttxt+ctxt
|
||||
occtxt=ottxt+octxt
|
||||
maybe=false
|
||||
ad=false
|
||||
for (var ii=0;ii<eval("r"+to+"dbl");ii++) {
|
||||
crkanadb=eval("r"+to+"db[ii]")
|
||||
if (crkanadb==cctxt && !ad) {
|
||||
ad=true
|
||||
ftxt+=""+eval("r_"+to+"db[cctxt]")+";"
|
||||
ttxt=""
|
||||
ottxt=""
|
||||
maybe=true
|
||||
}
|
||||
else if (crkanadb.substr(0,cctxt.length)==cctxt && !ad) {
|
||||
ad=true
|
||||
ttxt+=ctxt
|
||||
ottxt+=octxt
|
||||
maybe=true
|
||||
}
|
||||
}
|
||||
if (!maybe) {
|
||||
ad=false
|
||||
for (var ii=0;ii<eval("r"+to+"dbl");ii++) {
|
||||
crkanadb=eval("r"+to+"db[ii]")
|
||||
if (crkanadb==ctxt && !ad) {
|
||||
ad=true
|
||||
ftxt+=occtxt.substr(0,1)+""+eval("r_"+to+"db[ctxt]")+";"
|
||||
ttxt=""
|
||||
ottxt=""
|
||||
maybe=true
|
||||
}
|
||||
}
|
||||
if (!maybe) {
|
||||
ftxt+=ottxt
|
||||
ttxt=ctxt
|
||||
ottxt=octxt
|
||||
}
|
||||
}
|
||||
}
|
||||
//document.title="cc: "+cctxt+" c: "+ctxt+" t: "+ttxt
|
||||
ftxt+=ottxt
|
||||
ftxt=html_entity_decode(ftxt)
|
||||
}
|
||||
else if (to=="romaji") {
|
||||
var ctxt
|
||||
var ckana
|
||||
var isit
|
||||
for (var i=0;i<strlen;i++) {
|
||||
ctxt=str.substr(i,1)
|
||||
isit=false
|
||||
for (var ii=0;ii<kkanadbl && !isit;ii++) {
|
||||
ckana=kkanadb[ii]
|
||||
if (html_entity_decode(""+ckana+";")==ctxt) isit=true
|
||||
}
|
||||
if (isit) ftxt+=k_kanadb[ckana]
|
||||
else ftxt+=ctxt
|
||||
}
|
||||
}
|
||||
return ftxt
|
||||
}
|
||||
|
||||
function copy_value(from,to) {
|
||||
if (from==infocus) {
|
||||
ovalue=eval(from+"_text").value
|
||||
nto=to.split(",")
|
||||
tol=nto.length
|
||||
for (var i=0;i<tol;i++) {
|
||||
cto=nto[i]
|
||||
if (ovalue!="") nvalue=convert_value(ovalue,from,cto)
|
||||
else nvalue=""
|
||||
eval(cto+"_text").value=nvalue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onload=function(){
|
||||
box_div=document.getElementById("box")
|
||||
romaji_div=document.getElementById("romaji_container")
|
||||
kana_div=document.getElementById("kana_container")
|
||||
hk_div=document.getElementById("hirakata")
|
||||
|
||||
romaji_text=document.getElementById("romaji")
|
||||
kana_text=document.getElementById("kana")
|
||||
hira_text=document.getElementById("hira")
|
||||
kata_text=document.getElementById("kata")
|
||||
|
||||
if (navigator.appVersion.toLowerCase().indexOf("chrome")!=-1) {
|
||||
hira_text.style.height="78px"
|
||||
kata_text.style.height="78px"
|
||||
}
|
||||
|
||||
oppo=new Array()
|
||||
oppo["romaji"]="kana"
|
||||
oppo["kana"]="romaji"
|
||||
visibility_action=new Array()
|
||||
visibility_action["romaji"]="block"
|
||||
visibility_action["kana"]="none"
|
||||
|
||||
romaji_input=""
|
||||
romaji_output=""
|
||||
infocus=""
|
||||
|
||||
rhiradb=new Array("o","a","sa","ki","ma","ho","ha","yo","mu","mo","shi","si","nu","me","to","ko","ni","ta","na","ne","wa","le","re","se","ke","mi","no","tsu","tzu","tu","u","la","ra","chi","ci","ti","lo","ro","lu","ru","yu","ya","wo","li","ri","n'","e","so","te","he","ku","fu","hu","su","hi","ka","i")
|
||||
rhiradbl=rhiradb.length
|
||||
|
||||
r_hiradb=new Array()
|
||||
r_hiradb["o"]=362
|
||||
r_hiradb["a"]=354
|
||||
r_hiradb["sa"]=373
|
||||
r_hiradb["ki"]=365
|
||||
r_hiradb["ma"]=414
|
||||
r_hiradb["ho"]=411
|
||||
r_hiradb["ha"]=399
|
||||
r_hiradb["yo"]=424
|
||||
r_hiradb["mu"]=416
|
||||
r_hiradb["mo"]=418
|
||||
r_hiradb["shi"]=375
|
||||
r_hiradb["si"]=375
|
||||
r_hiradb["nu"]=396
|
||||
r_hiradb["me"]=417
|
||||
r_hiradb["to"]=392
|
||||
r_hiradb["ko"]=371
|
||||
r_hiradb["ni"]=395
|
||||
r_hiradb["ta"]=383
|
||||
r_hiradb["na"]=394
|
||||
r_hiradb["ne"]=397
|
||||
r_hiradb["wa"]=431
|
||||
r_hiradb["le"]=428
|
||||
r_hiradb["re"]=428
|
||||
r_hiradb["se"]=379
|
||||
r_hiradb["ke"]=369
|
||||
r_hiradb["mi"]=415
|
||||
r_hiradb["no"]=398
|
||||
r_hiradb["tsu"]=388
|
||||
r_hiradb["tzu"]=388
|
||||
r_hiradb["tu"]=388
|
||||
r_hiradb["u"]=358
|
||||
r_hiradb["la"]=425
|
||||
r_hiradb["ra"]=425
|
||||
r_hiradb["chi"]=385
|
||||
r_hiradb["ci"]=385
|
||||
r_hiradb["ti"]=385
|
||||
r_hiradb["lo"]=429
|
||||
r_hiradb["ro"]=429
|
||||
r_hiradb["lu"]=427
|
||||
r_hiradb["ru"]=427
|
||||
r_hiradb["yu"]=422
|
||||
r_hiradb["ya"]=420
|
||||
r_hiradb["wo"]=434
|
||||
r_hiradb["li"]=426
|
||||
r_hiradb["ri"]=426
|
||||
r_hiradb["n'"]=435
|
||||
r_hiradb["e"]=360
|
||||
r_hiradb["so"]=381
|
||||
r_hiradb["te"]=390
|
||||
r_hiradb["he"]=408
|
||||
r_hiradb["ku"]=367
|
||||
r_hiradb["fu"]=405
|
||||
r_hiradb["hu"]=405
|
||||
r_hiradb["su"]=377
|
||||
r_hiradb["hi"]=402
|
||||
r_hiradb["ka"]=363
|
||||
r_hiradb["i"]=356
|
||||
|
||||
|
||||
rkatadb=new Array("ka","u","me","no","i","to","chi","ci","ti","o","mi","yo","mu","ke","wa","nu","so","n'","sa","na","te","yu","ko","e","ku","fu","hu","su","tsu","tzu","tu","shi","si","li","ri","lu","ru","le","re","hi","lo","ro","he","ho","ta","la","ra","wo","ki","ni","ha","se","ya","a","ma","ne")
|
||||
rkatadbl=rkatadb.length
|
||||
|
||||
r_katadb=new Array()
|
||||
r_katadb["ka"]=459
|
||||
r_katadb["u"]=454
|
||||
r_katadb["me"]=513
|
||||
r_katadb["no"]=494
|
||||
r_katadb["i"]=452
|
||||
r_katadb["to"]=488
|
||||
r_katadb["chi"]=481
|
||||
r_katadb["ci"]=481
|
||||
r_katadb["ti"]=481
|
||||
r_katadb["o"]=458
|
||||
r_katadb["mi"]=511
|
||||
r_katadb["yo"]=520
|
||||
r_katadb["mu"]=512
|
||||
r_katadb["ke"]=465
|
||||
r_katadb["wa"]=527
|
||||
r_katadb["nu"]=492
|
||||
r_katadb["so"]=477
|
||||
r_katadb["n'"]=531
|
||||
r_katadb["sa"]=469
|
||||
r_katadb["na"]=490
|
||||
r_katadb["te"]=486
|
||||
r_katadb["yu"]=518
|
||||
r_katadb["ko"]=467
|
||||
r_katadb["e"]=456
|
||||
r_katadb["ku"]=463
|
||||
r_katadb["fu"]=501
|
||||
r_katadb["hu"]=501
|
||||
r_katadb["su"]=473
|
||||
r_katadb["tsu"]=484
|
||||
r_katadb["tzu"]=484
|
||||
r_katadb["tu"]=484
|
||||
r_katadb["shi"]=471
|
||||
r_katadb["si"]=471
|
||||
r_katadb["li"]=522
|
||||
r_katadb["ri"]=522
|
||||
r_katadb["lu"]=523
|
||||
r_katadb["ru"]=523
|
||||
r_katadb["le"]=524
|
||||
r_katadb["re"]=524
|
||||
r_katadb["hi"]=498
|
||||
r_katadb["lo"]=525
|
||||
r_katadb["ro"]=525
|
||||
r_katadb["he"]=504
|
||||
r_katadb["ho"]=507
|
||||
r_katadb["ta"]=479
|
||||
r_katadb["la"]=521
|
||||
r_katadb["ra"]=521
|
||||
r_katadb["wo"]=530
|
||||
r_katadb["ki"]=461
|
||||
r_katadb["ni"]=491
|
||||
r_katadb["ha"]=495
|
||||
r_katadb["se"]=475
|
||||
r_katadb["ya"]=516
|
||||
r_katadb["a"]=450
|
||||
r_katadb["ma"]=510
|
||||
r_katadb["ne"]=493
|
||||
|
||||
|
||||
kkanadb=new Array("362","354","373","365","414","411","399","424","416","418","375","396","417","392","371","395","383","394","397","431","428","379","369","415","398","388","358","425","385","429","427","422","420","434","426","435","360","381","390","408","367","405","377","402","363","356")
|
||||
kkanadbl=kkanadb.length
|
||||
|
||||
k_kanadb=new Array()
|
||||
k_kanadb["362"]="o"
|
||||
k_kanadb["354"]="a"
|
||||
k_kanadb["373"]="sa"
|
||||
k_kanadb["365"]="ki"
|
||||
k_kanadb["414"]="ma"
|
||||
k_kanadb["411"]="ho"
|
||||
k_kanadb["399"]="ha"
|
||||
k_kanadb["424"]="yo"
|
||||
k_kanadb["416"]="mu"
|
||||
k_kanadb["418"]="mo"
|
||||
k_kanadb["375"]="shi"
|
||||
k_kanadb["375"]="si"
|
||||
k_kanadb["396"]="nu"
|
||||
k_kanadb["417"]="me"
|
||||
k_kanadb["392"]="to"
|
||||
k_kanadb["371"]="ko"
|
||||
k_kanadb["395"]="ni"
|
||||
k_kanadb["383"]="ta"
|
||||
k_kanadb["394"]="na"
|
||||
k_kanadb["397"]="ne"
|
||||
k_kanadb["431"]="wa"
|
||||
k_kanadb["428"]="le"
|
||||
k_kanadb["428"]="re"
|
||||
k_kanadb["379"]="se"
|
||||
k_kanadb["369"]="ke"
|
||||
k_kanadb["415"]="mi"
|
||||
k_kanadb["398"]="no"
|
||||
k_kanadb["388"]="tsu"
|
||||
k_kanadb["388"]="tzu"
|
||||
k_kanadb["388"]="tu"
|
||||
k_kanadb["358"]="u"
|
||||
k_kanadb["425"]="la"
|
||||
k_kanadb["425"]="ra"
|
||||
k_kanadb["385"]="chi"
|
||||
k_kanadb["385"]="ci"
|
||||
k_kanadb["385"]="ti"
|
||||
k_kanadb["429"]="lo"
|
||||
k_kanadb["429"]="ro"
|
||||
k_kanadb["427"]="lu"
|
||||
k_kanadb["427"]="ru"
|
||||
k_kanadb["422"]="yu"
|
||||
k_kanadb["420"]="ya"
|
||||
k_kanadb["434"]="wo"
|
||||
k_kanadb["426"]="li"
|
||||
k_kanadb["426"]="ri"
|
||||
k_kanadb["435"]="n'"
|
||||
k_kanadb["360"]="e"
|
||||
k_kanadb["381"]="so"
|
||||
k_kanadb["390"]="te"
|
||||
k_kanadb["408"]="he"
|
||||
k_kanadb["367"]="ku"
|
||||
k_kanadb["405"]="fu"
|
||||
k_kanadb["405"]="hu"
|
||||
k_kanadb["377"]="su"
|
||||
k_kanadb["402"]="hi"
|
||||
k_kanadb["363"]="ka"
|
||||
k_kanadb["356"]="i"
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='box'>
|
||||
|
||||
<div id='wl'>
|
||||
Warning!
|
||||
<div id='wn'>
|
||||
This isn't a very good kana-romaji converter. For one thing, it's in a web browser and relies on the power of the user's computer. Second, it's also not complete. It only translates basic kanas. Kanas consisting of 2 signs simply don't exist in this web app. Instead I recommend JWPce for use as a text editor. It's simple and works perfectly.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id='romaji_container'>
|
||||
<h1 onclick='pfocus("romaji")'>Romaji</h1>
|
||||
<textarea id='romaji' onfocus='bpfocus("romaji")' onblur='pblur("romaji")' onkeyup='copy_value("romaji","hira,kata")'></textarea>
|
||||
</div>
|
||||
|
||||
<div id='kana_container'>
|
||||
<h1 onclick='pfocus("kana")'>Kana</h1>
|
||||
<textarea id='kana' onfocus='pfocus("kana")' onblur='pblur("kana")' onkeyup='copy_value("kana","romaji")'></textarea>
|
||||
<div id='hirakata'>
|
||||
<h2>Hiragana:</h2>
|
||||
<textarea id='hira' onfocus='bpfocus("kana","hira")'></textarea>
|
||||
<h2>Katakana:</h2>
|
||||
<textarea id='kata' onfocus='bpfocus("kana","kata")'></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
projects/jap/kanaverter/logo.png
Normal file
BIN
projects/jap/kanaverter/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
projects/jap/kanaviewer.png
Normal file
BIN
projects/jap/kanaviewer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
BIN
projects/jap/kanaviewer/bak/logo.xcf
Normal file
BIN
projects/jap/kanaviewer/bak/logo.xcf
Normal file
Binary file not shown.
102
projects/jap/kanaviewer/db.php
Normal file
102
projects/jap/kanaviewer/db.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php die() ?>
|
||||
362o
|
||||
354a
|
||||
373sa
|
||||
365ki
|
||||
414ma
|
||||
411ho
|
||||
399ha
|
||||
424yo
|
||||
416mu
|
||||
418mo
|
||||
375shi,si
|
||||
_
|
||||
396nu
|
||||
417me
|
||||
392to
|
||||
371ko
|
||||
395ni
|
||||
383ta
|
||||
394na
|
||||
397ne
|
||||
431wa
|
||||
428le,re
|
||||
379se
|
||||
369ke
|
||||
_
|
||||
415mi
|
||||
398no
|
||||
388tsu,tzu,tu
|
||||
358u
|
||||
425la,ra
|
||||
385chi,ci,ti
|
||||
429lo,ro
|
||||
427lu,ru
|
||||
422yu
|
||||
420ya
|
||||
434wo
|
||||
426li,ri
|
||||
_
|
||||
435n,n'
|
||||
360e
|
||||
381so
|
||||
390te
|
||||
408he
|
||||
367ku
|
||||
405fu,hu
|
||||
377su
|
||||
402hi
|
||||
363ka
|
||||
-
|
||||
356i
|
||||
|
|
||||
459ka
|
||||
454u
|
||||
513me
|
||||
494no
|
||||
452i
|
||||
488to
|
||||
481chi,ci,ti
|
||||
458o
|
||||
511mi
|
||||
520yo
|
||||
-
|
||||
512mu
|
||||
_
|
||||
465ke
|
||||
527wa
|
||||
492nu
|
||||
477so
|
||||
531n,n'
|
||||
469sa
|
||||
490na
|
||||
486te
|
||||
518yu
|
||||
467ko
|
||||
456e
|
||||
_
|
||||
463ku
|
||||
501fu,hu
|
||||
473su
|
||||
484tsu,tzu,tu
|
||||
471shi,si
|
||||
522li,ri
|
||||
523lu,ru
|
||||
524le,re
|
||||
498hi
|
||||
525lo,ro
|
||||
504he
|
||||
507ho
|
||||
_
|
||||
479ta
|
||||
521la,ra
|
||||
530wo
|
||||
-
|
||||
461ki
|
||||
491ni
|
||||
495ha
|
||||
475se
|
||||
516ya
|
||||
450a
|
||||
510ma
|
||||
493ne
|
||||
122
projects/jap/kanaviewer/index.php
Normal file
122
projects/jap/kanaviewer/index.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
$f=fopen("db.php","r");
|
||||
$odb=explode("\r\n|\r\n",substr(fread($f,filesize("db.php")),16));
|
||||
fclose($f);
|
||||
$odbl=sizeof($odb);
|
||||
|
||||
for ($i=0;$i<$odbl;$i++) {
|
||||
if ($i==0) $ft.="<h1>Hiragana:</h1>";
|
||||
else $ft.="<h1>Katakana:</h1>";
|
||||
$odb1=explode("\r\n_\r\n",$odb[$i]);
|
||||
$odb1l=sizeof($odb1);
|
||||
for ($ii=0;$ii<$odb1l;$ii++) {
|
||||
$odb2=explode("\r\n",$odb1[$ii]);
|
||||
$odb2l=sizeof($odb2);
|
||||
for ($iii=0;$iii<$odb2l;$iii++) {
|
||||
$cdp=$odb2[$iii];
|
||||
if ($cdp!="-") {
|
||||
$cdpa=substr($cdp,0,3);
|
||||
$cdpb=substr($cdp,3);
|
||||
$ft.="<div><div>".$cdpb."</div>".$cdpa.";</div>";
|
||||
}
|
||||
else $ft.="<div class='none'></div>";
|
||||
}
|
||||
if ($ii+1<$odb1l) $ft.="\n<div class='nl'></div>\n";
|
||||
}
|
||||
if ($i+1<$odbl) $ft.="\n<div class='nls'></div>\n";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3c.org/1999/xhtml">
|
||||
<head>
|
||||
<title>kanaviewer</title>
|
||||
<style type='text/css'>
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#box {
|
||||
background:#f5f5f5 url(logo.png) no-repeat 2px 4px;
|
||||
width:480px;
|
||||
height:400px;
|
||||
position:absolute;
|
||||
left:50%;
|
||||
top:50%;
|
||||
margin-left:-244px;
|
||||
margin-top:-228px;
|
||||
padding:50px 3px 3px 3px;
|
||||
border:1px solid #999;
|
||||
}
|
||||
|
||||
#box h1 {
|
||||
font:24px georgia;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
#box div {
|
||||
float:left;
|
||||
width:30px;
|
||||
height:30px;
|
||||
padding:5px;
|
||||
font-size:30px;
|
||||
cursor:default;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#box div div, #box div div:hover {
|
||||
position:absolute;
|
||||
top:-15px;
|
||||
left:2px;
|
||||
z-index:2;
|
||||
font:normal 12px arial;
|
||||
padding:1px 2px;
|
||||
border:1px solid #000;
|
||||
background:#ddd;
|
||||
width:auto;
|
||||
height:auto;
|
||||
float:none;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#box div:hover {
|
||||
border:1px solid #000;
|
||||
padding:4px;
|
||||
background:#eee;
|
||||
}
|
||||
|
||||
#box div:hover div {
|
||||
display:block;
|
||||
}
|
||||
|
||||
#box div.nl, #box div.nls {
|
||||
float:none;
|
||||
width:0px;
|
||||
padding:5px 0;
|
||||
}
|
||||
|
||||
#box div.nls {
|
||||
height:52px;
|
||||
}
|
||||
|
||||
#box div.ls {
|
||||
width:0;
|
||||
height:0;
|
||||
}
|
||||
|
||||
#box div.nl:hover, #box div.nls:hover, #box div.none:hover {
|
||||
border:0;
|
||||
padding:5px;
|
||||
background:transparent;
|
||||
}
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='box'>
|
||||
<?php echo $ft; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
projects/jap/kanaviewer/logo.png
Normal file
BIN
projects/jap/kanaviewer/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user