| <?xml version="1.0" encoding="UTF-8"?> |
| <svg width="800" height="1000" xmlns="http://www.w3.org/2000/svg" onload="init()"> |
| <script language="JavaScript"> |
| var fontFamily1 = "Arial"; |
| var fontFamily2 = "LucidaSansUnicode"; |
| var fontFamily3 = "MS-Gothic"; |
| |
| var entryYOffset = 10; |
| var entryYDelta = 16; |
| |
| var entryX = new Array(); |
| entryX[0] = 10; |
| entryX[1] = 100; |
| entryX[2] = 190; |
| |
| var entryXEnd = entryX[0] + entryX[1] + entryX[2]; |
| |
| var entryY = new Array(); |
| entryY[0] = entryYOffset; |
| entryY[1] = entryYOffset; |
| entryY[2] = entryYOffset; |
| |
| var insert; |
| |
| function drawGrid(xValue, yValue) |
| { |
| var line = document.createElement("line"); |
| line.x1.baseVal.value = Math.floor(xValue); |
| line.y1.baseVal.value = Math.floor(yValue) + (entryYDelta / 2) - 4; |
| line.x2.baseVal.value = Math.floor(xValue) + entryXEnd; |
| line.y2.baseVal.value = Math.floor(yValue) + (entryYDelta / 2) - 4; |
| line.setAttribute("style", "stroke-width:1px; stroke:black; opacity:0.5"); |
| |
| insert.appendChild(line); |
| } |
| |
| function entry(message, xValue, yValue, family) |
| { |
| var text = document.createElement("text"); |
| |
| // Set X/Y properties using SVG DOM |
| var xLength = document.rootElement.createSVGLength(); |
| xLength.value = xValue; |
| |
| var yLength = document.rootElement.createSVGLength(); |
| yLength.value = yValue; |
| |
| text.x.baseVal.appendItem(xLength); |
| text.y.baseVal.appendItem(yLength); |
| |
| // Append "Text" child node |
| text.appendChild(document.createTextNode(message)); |
| |
| // Choose font-size/font-family |
| switch (family) { |
| case 0: |
| text.setAttribute("font-family", fontFamily1); |
| break; |
| case 1: |
| text.setAttribute("font-family", fontFamily2); |
| break; |
| case 2: |
| text.setAttribute("font-family", fontFamily3); |
| break; |
| } |
| |
| text.setAttribute("font-size", "12"); |
| |
| // Add to tree |
| insert.appendChild(text); |
| return entryYDelta; |
| } |
| |
| function newEntry(col1, col2, col3, family) |
| { |
| drawGrid(entryX[0], entryY[0]); |
| |
| entryY[0] += entry(col1, entryX[0], entryY[0], family); |
| entryY[1] += entry(col2, entryX[1], entryY[1], family); |
| entryY[2] += entry(col3, entryX[2], entryY[2], family); |
| } |
| |
| function init() |
| { |
| insert = document.getElementById("insert"); |
| |
| newEntry("Arabic", "", "اÙسÙاÙ
عÙÙÙÙ
", 0); |
| newEntry("Bengali", "বাà¦à§à¦²à¦¾", "ষাà¦à¦¤à§à¦®", 0); // Which lang? |
| newEntry("Burmese", "", "áá¹ááá¹áá¬", 0); // Which lang? |
| newEntry("Cherokee", "á£á³á©", "á£áá²", 0); // Which lang? |
| newEntry("Czech", "Äesky", "Dobrý den", 0); |
| newEntry("Danish", "Dansk", "Hej, Goddag", 0); |
| newEntry("English", "", "Hello", 0); |
| newEntry("Esperanto", "", "Saluton", 0); |
| newEntry("Estonian", "", "Tere, Tervist", 0); |
| newEntry("Finnish", "Suomi", "Hei", 0); |
| newEntry("French", "Français", "Bonjour, Salut", 0); |
| newEntry("German", "Deutsch Nord", "Guten Tag", 0); |
| newEntry("German", "Deutsch Süd", "Grüà Gott", 0); |
| newEntry("Georgian", "á¥áá ááááá", "ááááá á¯ááá", 0); // Which lang? |
| newEntry("Gujarati", "", "àªà«àªàª°àª¾àª¤àª¿", 0); // Which lang? |
| newEntry("Greek", "Îλληνικά", "Îειά ÏαÏ", 0); |
| newEntry("Hebrew", "", "ש×××", 1); |
| newEntry("Hindi", "", "नमसà¥à¤¤à¥, नमसà¥à¤à¤¾à¤°à¥¤", 0); // Which lang? |
| newEntry("Italiano", "", "Ciao, Buon giorno", 0); |
| newEntry("ɪÅglɪÊ", "", "hÉlÉÊ", 1); // Which lang here? |
| newEntry("Maltese", "", "Äaw, Saħħa", 1); |
| newEntry("Nederlands", "", "Hallo, Dag", 0); |
| newEntry("Norwegian", "Norsk", "Hei, God dag", 0); |
| newEntry("Punjabi", "", "à©à¨ªà©à¨à¨à¨¾à¨¬à¨¿", 0); // Which lang? |
| newEntry("Polish", "", "DzieÅ dobry, Hej", 0); |
| newEntry("Russian", "Ð ÑÑÑкий", "ÐдÑавÑÑвÑйÑе!", 0); |
| newEntry("Slovak", "", "Dobrý deÅ", 0); |
| newEntry("Spanish", "Español", "â¡Hola!â", 1); |
| newEntry("Swedish", "Svenska", "Hej, Goddag", 0); |
| newEntry("Thai", "ภาษาà¹à¸à¸¢", "สวัสà¸à¸µà¸à¸£à¸±à¸, สวัสà¸à¸µà¸à¹à¸°", 0); // Which lang? |
| newEntry("Turkish", "Türkçe", "Merhaba", 0); |
| newEntry("Vietnamese", "Tiếng Viá»t", "Xin Chà o", 0); |
| newEntry("Yiddish", "ײַ××שע", "××ָס ×ײַ××¢××¢ ", 1); |
| newEntry("Japanese", "æ¥æ¬èª", "ããã«ã¡ã¯, コï¾ï¾ï¾ï¾", 2); |
| newEntry("Chinese", "ä¸æ,æ®éè¯,æ±è¯½", "ä½ å¥½", 2); |
| newEntry("Cantonese", "ç²µèª,廣æ±è©±", "æ©æ¨, ä½ å¥½", 2); |
| newEntry("Korean", "íê¸", "ìë
íì¸ì, ìë
íìëê¹", 0); // Which lang? |
| } |
| </script> |
| |
| <g id="insert"/> |
| </svg> |