Golang : Gargish-English language translator
Another just for fun example where I get to translate English text into Gargoyle's language - Gargish. I first got to know about Gargish when playing Ultima 6 as a kid and really hooked by the CRPG(Computer Role Playing Game) game. Gargish is an artificial language created by Herman Miller for the Gargoyles in Ultima 6 world and it has its own writings similar to Germanic Runes.
The following program is very similar to my previous tutorial on converting Jawi to Rumi and back to Jawi, but with a few enhancements to handle plural/singular English words translation to Gargish.
To get this program to run, first you will need the Gargish-English dictionary file -> download gargdict2019.txt .
Scroll further down to see the dictionary data.
Here you go!
package main
import (
"fmt"
"io/ioutil"
"os"
"strings"
)
// Read more about Gargish - Gargoyle language at
// https://www.omniglot.com/conscripts/gargish.htm
// and
// http://ultimajourneys.blogspot.com/2015/09/linguistic-asides-on-gargish.html?spref=fb
func main() {
// English to Gargish
// one map for each dictionary
gargishEnglish := map[string]string{}
englishGargish := map[string]string{}
// ------------------------------------------------
// The Gargoyle Alphabet
// gargdict.txt is lost forever.... cannot find it in http://martin.brenner.de/ultima/index.html
// buy found another translation table at http://wiki.ultimacodex.com/wiki/Gargish_Alphabet
// yahooo!!!
// rebuild gargish dictionary by copy-n-paste and modified a little
// padded some "extras" to distinguish the same Gargish word.
fileName := "gargdict2019.txt"
fileBytes, err := ioutil.ReadFile(fileName)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
lines := strings.Split(string(fileBytes), "\n")
// build the dictionaries
for _, line := range lines {
split := strings.Split(line, ",")
gargish := split[0]
english := split[1]
gargishEnglish[english] = gargish
englishGargish[gargish] = english
}
// Tests from http://wiki.ultimacodex.com/wiki/Gargish_Alphabet
// Under Examples of Usage section
//test := "Here lie those that had no names." // idiomatic
//test := "place that lie ones not have of name" // literal
//test := "that time I used light change begin make know light codex upon cube"
//test := "thus not there is of principle see guide toward seven of well quality order" //<--- really bad result!
//test := "in that place home live number strange creature"
//test := "Within this chamber rest the bones of kings"
// From the Book of Family
//test := "When a child hatches from his egg , he is born without wings"
//test := "But even from birth one can tell whether a child will grow up to be a winged or a wingless one"
//test := "The wingless ones cannot speak"
//test := "and lack the intelligence of the winged ones"
test := "to better maintain the struggle for survival in our world"
// lower case everything
test1 := strings.ToLower(test)
fmt.Println("Translating : [", test1, "]")
//get rid of empty spaces in front and back
test1 = strings.TrimPrefix(test1, " ")
test1 = strings.TrimSuffix(test1, " ")
//chunk them
englishWords := strings.Split(test1, " ")
var gargishSB strings.Builder
for _, word := range englishWords {
// turn plural to singular
searchString := Singular(string(word))
//fmt.Println("==", searchString)
fmt.Println(gargishEnglish[searchString] + " >> " + word)
gargishSB.WriteString(gargishEnglish[searchString] + " ")
}
fmt.Println("-------------------------------------------------")
fmt.Println(gargishSB.String())
fmt.Println("-------------------------------------------------")
fmt.Println("NOTE : Okay, almost the same as those found in http://wiki.ultimacodex.com/wiki/Gargish_Alphabet")
// back to literal english
gargish := gargishSB.String()
// get rid of empty spaces in front and back
gargish = strings.TrimPrefix(gargish, " ")
gargish = strings.TrimSuffix(gargish, " ")
gargishWords := strings.Split(gargish, " ")
var englishSB strings.Builder
for _, word := range gargishWords {
fmt.Println(englishGargish[word] + " >> " + string(word))
englishSB.WriteString(englishGargish[string(word)] + " ")
}
fmt.Println("-------------------------------------------------")
fmt.Println(englishSB.String())
fmt.Println("-------------------------------------------------")
fmt.Println("NOTE : Just like Google Translate. The translation will never be perfect when translating back to English...")
fmt.Println(" Maybe, need NLP tool assistance.")
}
//-------------------------------------------------------------------------------------------------
// https://www.socketloop.com/tutorials/golang-takes-a-plural-word-and-makes-it-singular
func Singular(input string) string {
if !IsCountable(input) {
return input
}
var singularDictionary = map[string]string{
"are": "is",
"analyses": "analysis",
"alumni": "alumnus",
"aliases": "alias",
"axes": "axis",
//"alumni": "alumnae", // for female - cannot have duplicate in map
"genii": "genius",
"data": "datum",
"atlases": "atlas",
"appendices": "appendix",
"barracks": "barrack",
"beefs": "beef",
"buses": "bus",
"brothers": "brother",
"cafes": "cafe",
"corpuses": "corpus",
"campuses": "campus",
"cows": "cow",
"crises": "crisis",
"ganglions": "ganglion",
"genera": "genus",
"graffiti": "graffito",
"loaves": "loaf",
"matrices": "matrix",
"monies": "money",
"mongooses": "mongoose",
"moves": "move",
"movies": "movie",
"mythoi": "mythos",
"lice": "louse",
"niches": "niche",
"numina": "numen",
"octopuses": "octopus",
"opuses": "opus",
"oxen": "ox",
"penises": "penis",
"vaginas": "vagina",
"vertices": "vertex",
"viruses": "virus",
"shoes": "shoe",
"sexes": "sex",
"testes": "testis",
"turfs": "turf",
"teeth": "tooth",
"feet": "foot",
"cacti": "cactus",
"children": "child",
"criteria": "criterion",
"news": "news",
"deer": "deer",
"echoes": "echo",
"elves": "elf",
"embargoes": "embargo",
"foes": "foe",
"foci": "focus",
"fungi": "fungus",
"geese": "goose",
"heroes": "hero",
"hooves": "hoof",
"indices": "index",
"knifes": "knife",
"leaves": "leaf",
"lives": "life",
"men": "man",
"mice": "mouse",
"nuclei": "nucleus",
"people": "person",
"phenomena": "phenomenon",
"potatoes": "potato",
"selves": "self",
"syllabi": "syllabus",
"tomatoes": "tomato",
"torpedoes": "torpedo",
"vetoes": "veto",
"women": "woman",
"zeroes": "zero",
"natives": "native",
"hives": "hive",
"quizzes": "quiz",
"bases": "basis",
"diagnostic": "diagnosis",
"parentheses": "parenthesis",
"prognoses": "prognosis",
"synopses": "synopsis",
"theses": "thesis",
"hatches": "hatch", //<---- additional rules for EXCLUSION
"wingless": "wingless", // <---- not perfect, but it works
}
result := singularDictionary[strings.ToLower(input)]
if result == "" {
// to handle words like apples, doors, cats
if len(input) > 2 {
if string(input[len(input)-1]) == "s" {
if string(input[len(input)-2:]) == "is" || string(input[len(input)-2:]) == "us" {
return string(input) // but exclude word such as "this" and "thus"
} else {
return string(input[:len(input)-1])
}
}
}
return input
} else {
return result
}
}
func IsCountable(input string) bool {
// dictionary of word that has no plural version
toCheck := strings.ToLower(input)
var nonCountable = []string{
"audio",
"bison",
"chassis",
"compensation",
"coreopsis",
"data",
"deer",
"education",
"emoji",
"equipment",
"fish",
"furniture",
"gold",
"information",
"knowledge",
"love",
"rain",
"money",
"moose",
"nutrition",
"offspring",
"plankton",
"pokemon",
"police",
"rice",
"series",
"sheep",
"species",
"swine",
"traffic",
"wheat",
}
for _, v := range nonCountable {
if toCheck == v {
return false
}
}
return true
}
References :
http://martin.brenner.de/ultima/
https://www.omniglot.com/conscripts/gargish.htm
http://wiki.ultimacodex.com/wiki/Gargish_Alphabet
gargdict2019.txt
a,but
a,yet
a-sa,cannot
abis,bee
abis-áilem,honey
abis-kans,honey
abis-reg,beehive
abu,misuse
abu,squander
abu,waste
ac,act
ack,proof
ack,receipt
ac-tas,act
ac-tas,process
acu,needle
acu,pin
acu,detail
ad,on
ad,upon
ade,however
adictas,addition
adix,add
adsenkt,agree
adsenktas,agreement
adsenkt-de,approve
adsi,consent
adsi,incessant
adsi,regular
aes,copper
afin,acquaintance
afin,relation
afin,relationship
afin,bond
aglo,armor
ágra,attack
ágra,fight
ágra,hit
ágra-char,weapon
ágra-char-in-lem,blacksmith
ágra-char-in-lem,Weaponsmith
ágra-lem,fighter
ágra-lem,guard
ágra-lem,warrior
ágra-lem-mur,army
ágra-lem-mur,military
ágra-tas,struggle
áh,sixty-four
ai,there is
ai,there are
ai-re,there will be
aig nail,rivet
aig nail,spike
áilem,dust
áilem,matter
áilem,substance
áilem,thing
áilem-char,material
áilem-de,solid
aio,yes
ai-re,there will be
ak,sharp
aki,hawk
aksi,law
axi,principle
aksi-múr,the three principles
axi-múr,the three principles
al,salt
alb,white
ali,other
alt,deep
alv,belly
alv,stomach
alv,womb
am,honesty
am,honest
amb,stroll
amb,walk
amit,give up
amit,lose
amit-tas,loss
ámo,love
ámo-ágra-tas,competition
ámo-lem,friend
ámo-lem,loved one
an,negate
an,negative
an,not
an,none
an,no
an-ad,off
an-adsenk-tas,against
an-ágra,peace
an-ai,absence
an-áilem,nothing
an-ámo,hate
an-ámo,hatred
an-ámo-lem,enemy
an-ang,loose
an-ang,loosen
an-ang,wide
an-aur,credit
an-bal,good
an-bal-sil-fer,False Prophet
an-ben,sick; ill
an-ben,ill
an-ben-tas,disease
an-cel,short
an-cel-lem,commoner
an-cirk,far
an-do,front
an-ex,slave
an-ex,enslave
an-ex-por,closed
an-ex-por,locked
an-ex-por,lock
an-flam,put out
an-flam,douse
an-flam,cold
an-húr,calm
an-in,crush
an-in,smash
an-in,destroy
an-in-tas,demolition
an-in-tas,destruction
an-jux,remove danger
an-jux,safe
an-jux,secure
an-jux,untrap
an-kad-sa,infallible
an-kal,banish
an-kans,famine
an-kred,doubt
an-kred,discredit
an-kred,disbelief
an-ku,without
an-ku-kred,impulse
an-ku-kred,impulsive
an-lai,sad
an-lai,unhappy
an-lim,rough
an-lim,sketch
an-lim,sketchy
an-lim,unrefined
an-lor,dark
an-lor,darkness
an-lor-tim,night
an-mání,hurt
an-mání,harm
an-mis,different
an-mul,shame
an-múr,few
an-múr-de,countless
an-nax,cure poison
an-nax-áilem,antidote
an-ord,chaos
an-ort,dispel
an-ort,negate magic
an-plen,drain
an-por,still
an-por,motionless
an-por,stop
an-por,rest
an-por,lock
an-pur,complex
an-pur,dirty
an-quas,reality
an-quas,real
an-rap,slow
an-rel,static
an-rel,constant
an-rel,unchanging
an-sá,cannot
an-saengkt,curse
an-saengkt,cursed
an-saengkt,unprotected
an-son,silent
an-son,quiet
an-ten,lack
an-tim,never
an-uus,low
an-vas-ku,thin
an-vas-ku,slender
an-ver,left
an-vol-de,wingless
an-vold-de,wingless
an-wís,foolish
an-wís,unwise
an-wís,forget
an-zen,inanimate
an-zú,awake
an-zú,awaken
an-zú,conscious
an-zú,wake
an-zú,wake up
ann,year
ang,cling
ang,tight
ang-ku,clingy
ang-ter,narrow
angulem,angle
ang-vid,scrutiny
ang-vid,observation
anísh,strange
anmánívas,Anmanivas
ansikart,Ansikart
ant,pump
ánte,within
ánte,into
ánte,in
ánte,enter
ánte,among
apér,open
apér,unlock
apér-an-tu,private
apér-ter,door
apér-ter,gate
apér-tu,public
ápta,proper
ápta,correct
ápta-de,properly
aran,orange
arb,bush
arb,vegetation
arb-char,plow
arb-char,plough
arb-de,nature
arb-de,natural
arb-flam,forest fire
arb-kans,fruit
arb-lem,farmer
arb-ped,root
arb-reg,farm
arb-teg,tree bark
arch,arc
arch,bent
arch,bow
arch,curve
arg,silver
arí,berserk
ark,hide
ark,keep-away
ark-lem,stealth
ark-tas,secret
arr,interrogate
arr,ask
arr,question
arr-tas,interrogation
arr-tas,question
ars,art
ars-lem,artist
ars-solu,stage
art,master
asper,despise
asper,disdain
asper,scorn
asper,spurn
assuk,insurance
ast,at
ater,brick
atra,ink
átri,hall
au,or
aud,hear
aud,listen
aud,ear
aud-char,song
aud-de,hearing
aur,gold
aur,money
aurvidlem,Aurvidlem
aust,south
aut,self
aux,help
aux,support
ávatr,Avatar
avir,bird
axi,principle
axi-múr,the three principles
azer,bitter
baka,berry
bal,doom
bal,bad
bal,evil
bal-lem,Evil One
bal-mus,rat
bal-olef,stench; stink
bal-olef,stink
bal-sil,prophecy
bal-sil-fer,prophet
bal-son,noise
bal-ungo,chafe
bal-ungo,grind
bal-ungo,wear out
bal-zen,monster
basi,kiss
bea,fortune
bea,luck
bea,lucky
beh,justice
beh-de,proper
beh-lem,just one
beh-reg,courthouse
belis,anger
belis-ku,angry
belis-tas,anger
bel-lem,judge
ben,well
ben,healthy
ben,good
ben-de,properly
ben-de,well
ben-fin,success
ben-in,craft
ben-in-áilem,artifact
ben-in-lem,craftsman
ben-in-lem,Goodscrafter
ben-in-tas,precise
ben-in-tas,precision
ben-ku,kind
ben-ku,kindly
ben-lem,virtuous
ben-mon,manage
ben-mon-lem,manager
ben-mon-tas,political
ben-mon-tas,politics
ben-mon-tas,administration
ben-om-mání,prosperity
ben-reg,hospital
ben-sop,surprise
ben-sop,excite
ben-sop-tas,excitement
ben-tas,health
ben-tas,virtue
bet,small
bet-arb,plant
bet-drak,drake
bet-fil,thread
bet-lem,child
bet-mantik,pouch
bet-mens,shelf
bet-op,village
bet-sarp,worm
bet-ter-mír, well
bet-tim,new
bet-tim,young
bet-zen,insect
betra,Betra
beur,butter
bib,drink
bif,fork
bif,crossroad
bij,jewel
bólesh,Bolesh
braca,trousers
braca,pants
braca,breeches
brák,arm
bris,broken
buci,horn
buk,mouth
buk-kul,teeth
buk-kul,tooth
buk-marga,lip
buto,button
can,allow
can,let
cani',dog
car,part
car-de-arb,branch
carn,meat
cas,chance
cas,accident
cel,noble
cel,high
celsus,tall
cerub,brain
ceu,example
cev,goat
chan,allow
chan-por,admit
chan-por-tas,admittance
char,part
char-zen,member
circem,about
cirk,close
cirk,near
clav,key
clen,dependent
clens,client
cliv,slope
cliv,incline
clok,bell
clud,complete
cod,trail
cod,tail
coel,climate
coel,weather
cons,effect
cor,heart
cor,breast
coxi,digest
coxi-tas,acid
coxi-tas,acid
cras,dense
cras,heavy
cras,thick
crin,hair
crios,blood
cu,collar
cu,neck
cu-de,throat
cui,spoon
culk,cushion
cult,culture
cult,education
cur,cart
curo,run
dáemón,daemon
de,like
de,than
de,from
de,of
de,possess
de,belong
de-ku-est,probable
deji,cast
deji,hurl
deji,throw
deji,toss
del,line
del,row
del,verse
de-lem,owner
delsa,soft
delsa-teg,smooth
delsa-teks,linen
denae,again
deresh,Deresh
des,down
des,lower
des,reduce
des-áilem,hail
des-áilem,meteor storm
des-de,under
des-de,below
des-in-tas,underpinning
des-in-tas,foundation
des-lem,worker
des-lem,laborer
des-lem,handyman
des-por,descend
des-ter,valley
des-ter-múr,underworld
desbet,Desbet
dig,finger
dig-kir,ring
dim,remit
dim,return
dim,send
dis,asunder
dis,apart
do,back
dol,trick
dol,treachery
dol,deceit
dol,cunning
domu,building
don,yield
don,drop
don,give
don-an-hur,comfort
don-lai,please
don-múr,distribute
don-múr-tas,distribution
don-poen,grief
don-sadis,punish
don-sadis-tas,punishment
dot,debt
drak,dragon
draxínusom,Draxinusom
dúk,guide
dur,duration
dur,for
dur,while
eger,need
eger,desire
eger-ku,necessary
eger-ku,needed
ek,six
enu,list
equi,horse
er,so
erb,grass
esh,and
ew,and
est,are
est,is
est,exist
est,be
esta,such
esta,that
esta,those
esta-de,therewith
esta-de,thereby
esta-tim,then
et,albeit
et,although
et,though
evol,development
evol,growth
eks,freedom
eks,free
eks,release
ex,freedom
ex,free
ex,release
ex-por,unlocked
ex-por,open
ex-por,hatch
ex-rap,burst
exferlem,Exferlem
fai-an-kred,do
feb,decline
fed,bond
fed,connect
fed,tie
fed-tas,affinity
fed-tas,bond
fed-tas,connection
fed-tas,tie
fel,wrong
fel-tas,error
fel-wís,false
fel-wís,falsehood
fel-wís,lie
fel-wís,fable
felúka,Felucca
fem,female
fem-bet-lem,girl
fem-in-lem,mother
fem-lem,woman
fem-orn,dress
fem-prol,daughter
fen,window
fer,bear
fer,bring
fervi,boil
fervi-ku,boiling
fest,disgust
fest-as,contempt
fest-as,disgusting
fig,fixed
fig,fix
fil,cord
fil,cable
fin,end
fin-ku,over
fírm,close
fírm,shut
fla,whip
flam,flame
flam,fire
flam,heat
flam-char,oven
flam-ku,hot
flam-ku,warm
flam-tim,summer
flur,flower
fódus,Fodus
fol,leaf
for,strong
for-por,shove
fora,aperature
fora,fissure
fora,aperature
fora-ku,hollow
foranámo,Foranamo
forbrák,Forbrak
forlem,For-Lem
formi,ant
forskis,Forskis
frèt,brother
fu,deranged
fu,crazy
ful,brown
fum,smoke
fum,steam
fum,vapor
gargl,Gargoyle
gargl,Gargish
gat,cat
gen,knee
gens,gender
gens,sex
glór,glory
glub,ball
grat,thank
grat,thanks
grat,thank you
grav,authority
grav,energy
grav,field
grav,power
grebdil,Grebdil
gres,out
gres,exit
gres,way
gres-por,begone
gres-por,come out
gres-por,exit
gres-por,leave
gres-por,hatch
gres-por,go out
har,hour
harm,harmony
harp,clamp
harp,grappling
harp,hook
hiúman,human
hoc,till
hoc,until
horel,clock
horffé,Horffe
hori,gray
húr,air
húr,wind
húr-ex-cu,cough
húr-son,whistle
í,I
í,me
ídde,mine
ídde,possession
íde,my
ílem,we
ílem,us
ílem,he
ílem,she
ílem,they
ílem,I
ílem,i
in,make
in,create
in,cause
in,form
in,become
in-áilem,produce
in-aur,profit
in-aur-ku,profitable
in-bet,focus
in-bet,shrink
in-des,diminish
in-des,reduce
in-ex,release
in-ex,free
in-flam,ignite
in-flam,burn
in-húr,blow
in-jur,swear
in-jur,promise
in-jux,endanger
in-jux,threaten
in-ker,convince
in-korp,kill
in-korp,die
in-lor,illuminate
in-mání,heal
in-mání-lem,healer
in-mis,duplicate
in-mis,copy
in-nax,poison
in-ort,enchant
in-ten,maintain
in-por,go
in-por,come
in-por-dis,avoid
in-por-dis,avert
in-saengkt,protect
in-sel,decision
in-spak,range
in-ten,maintain
in-vas,enlarge
in-wís,learn
in-wís,teach
in-wís,study
in-wís-de,teaching
in-wís-lem,teacher
in-wís-lók,interpret
in-wís-lor,create an image
in-wís-lor,draw
in-wís-lor,paint
in-wís-tas,lesson
in-zen,born
in-zen,birth
in-zú,fall asleep
inforlem,Inforlem
init,begin
init,start
inmánílem,Inmanilem
insep,test
insep,try
insu,island
int,join
int-rep-ku,assemble
int-rep-ku,match
int-rep-ku,merge
int-vas,enlarge
int-vas,grow
int-zu,marry
int-zu,married
int-zu-tas,marriage
intes,between
inwíslóklem,Inwisloklem
ish,normal
ista,this
ita,thus
ita,so
iten,journey
jist,fiction
jup,skirt
júr,promise
júr,oath
jux,danger
jux,harm
jux,damage
juks,danger
juks,harm
juks,damage
jux-ark,defend
jux-ark,protect
jux-wís,alert
kad,fail
kad,collapse
kah,sacrifice
kah-mání-zen-de,sacrificial
kal,summon
kal,call
kal,greet
kal,hello
kal,usher in
kal-ort,cast
kal-ort,spell
kalix,chalice
kalix,cup
kans,eat
kans,consume
kans,use
kans-char,plate
kans-in-lem,Foodmaker
kans-in-lem,cook
kans-sa,consumable
kap,box
karbas,canvas
kas,helm
kat,fall
ker,certain
ker,sure
ker-de,to be sure
ker-de,certainly
ker-tas,conviction
kimik,chemical
kír,circle
kír-char,wheel
kír-ku,round
kír-por,orbit
kír-por,roll
klár,bright
qar,bright
klau,chamber
qau,chamber
klep,steal
klep,get
klep,take
qep,steal
qep,get
qep,take
klep-lem,thief
klep-lem,pirate
klí,three
qí,three
klí-tim,thrice
kódeks,book
kódeks,codex
kódex,book
kódex,codex
kódex-reg,library
kon,opposite
kons,organization
kor,courage
korb,basket
korp,death
korp,dead
korp,deadly
kort,chrysalis
kort,cork
kreb,frequent
kred,believe
kred,think
kred,consider
kred-char,mind
kred-don,entrust
kredon,entrust
kred-in,idea
kred-in,invention
kred-in-lem,creator
kred-in-lem,inventor
kred-lem,believer
kred-tas,thought
kred-tas,theory
kred-tas,opinion
kred-tas,belief
krill,Krill
ku,with
ku-ánte,within
ku-por,combine
kua,which
kua,as
qua,which
qua,as
kuad,cube
quad,cube
kuae,problem
quae,problem
kuar,four
quar,four
kuas,illusion
kuas,illusionary
quas,illusion
quas,illusionary
kui,any
quí,any
kui-áilem,anything
kui-tim,anytime
kul,knife
kuo,how
quó,how
kupsi,blade
kur,care
kur,attention
kur-ku,caring
kur-ku,attentive
la,the
lab,glide
lab,slide
lab,slip
lago,bottle
lai,happy
lai,happiness
lai,joy
lai,pleasure
lan,tongue
lanx,plate
lanx,platter
lanx,tray
lap,stone
lap,rock
laplem,Lap-Lem
lat,flank
lat,side
le,limit
le,end
le,action completed
le,could
le-in,achieve
le-in-tas,achievement
leb,pot
lect,electric
leg,read
leg-te,reading
lem,those
lem,one
lem,ones
lem,them
lem,it
lem,her
lem,him
lem,they
lem,she
lem,he
lem-de,his
lem-de,her
lem-de,its
lem-de,their
lem-múr,everyone
lem-múr,those
len,gentle
len-tas,gentleness
len-tas,kindness
líbrum,librum
líbrum,book
lig,line
lim,polish
lim,refine
ling,language
liy,language
lint,sail
lint,ship
lin-tas,boat
lint-reg,harbour
lint-reg,harbor
lint-tas,ship
lit,letter
loc,location
loc,position
lók,discuss
lók,say
lók,speak
lók,talk
lók,tell
lók-an-adsenktas,protest
lók-an-adsenktas,recriminate
lók-de,talking
lók-trak,represent
lók-trak-lem,representative
lor,light
lor-fil,ray
lor-rel,lens
lor-rel-in-lem,Lensmaker
lor-tim,day
lor-tim,daytime
lor-tim-init,morning
lor-tim-pos,tomorrow
lor-tim-prae,yesterday
lor-wís-lem,Lensmaker
lor-wís-lem,title
lor-wís-lem,scholar of light
lud,play
lud,humorous
lud,humor
lud,fun
lud,game
lud-áilem,toy
lud-ku,funny
lud-ku,playful
lud-lem,player
lum,humility
lum-lem,humble
luo,pay
luo,payment
lup,wolf
mac,wall
mag,important
mag,dear
mag-áilem,mass
mag-ars,science
mag-ars-lem,scientist
mag-dig,thumb
mag-enu,archive
mag-enu,record
mag-kred,religion
mag-mo,statement
mag-múr,committee
mag-sed,throne
mag-teks,flag
mag-trav,operation
mag-wís,news
makis,apparatus
makis,machine
mal,apple
mán,remain
mán-char,remains
mání,life
mání,healing
mání,live
mání-áilem,food
mání-de,medical
mantik,bag
mantik-teks,pocket
mánu,hand
mánu-orn,glove
mar,sea
marga,edge
mas,male
mas-bet-lem,boy
mas-in-lem,father
mas-lem,man
mas-orn,robe
mas-prol,son
med,center
med,middle
mek,sword
mek-lem,fighter
mek-lem,swordsman
mel,black
mens,table
ment,chin
min,less
minzur,amount
minzur,measure
minzur-char,ruler
minzur-char,measurement
mír,water
mír-an-nax,cure potion
mír-de,wave
mír-for,current
mír-for,water current
mír-korp-nox,deadly poison
mír-ku,watery
mír-ku,wet
mír-mání,healing potion
mír-sarp,sea serpent
mír-wís,turtle
mír-wís,giant turtle
mír-wís,dragon turtle
mis,same
mis,too
mis-squa,parallel
mis-tas,balance
mis-tim,also
mis-ve,similar
mit,sweet
mit-mání-áilem,cake
mo,noun
mo,word
mol,hammer
mon,to lead
mon,lead
mon-de,responsible
mon-lem,leader
mon-wís,advice
mont,mountain
mord,bite
mors,behavior
mors,tendency
mot,engine
mú,compassion
mul,pride
mun,minute
múr,number
múr,multiple
múr,group
múr,many
múr-flur,garden
múr-in-zen,fertile
múr-lor-tim,month
múr-om,community
múr-om,society
múr-pri-lem,council
múr-pri-lem,government
múr-skis,reorganize
múr-skis,sort
mus,mouse
nag,swim
nox,poison
nox,poisonous
nax,poison
nax,poisonous
naks,poison
naks,poisonous
naxátilor,Naxatilor
násh,Nash
neb,mist
nem,lumber
nem,wood
ner,nerge
nes,require
nes,must
nes,has to
nes-tas,demand
nes-tas,request
ni,no
ni,neither
nim,quite
nim,very
nix,snow
nod,knot
nóm,name
nub,cloud
o,by
oblek,amuse
oblektas,amusement
ok,eight
ok-de,eighth
ole,oil
olef,smell
olef-ku,smelly
olef-ku,stinky
olef-tas,odor
olef-tas,smell
om,spirituality
om-de,sacred
om-de,holy
om-jux,desecrate
op,city
op,town
op-som,tax
op-via,street
or,passion
orb,moon
orb-lap,moonstone
orb-rel,phase of moon
ord,order
orga,instrument
oric,ore
oric-de,metal
oric-de,steel
oric-reg,mine
oric-te,mine
orn,dress
orn-tas,ornament
oro,argue
oro-tas,argument
ort,magic
ort-lem,mage
ort-mír,magical potion
os,bone
os,bones
ov,egg
pa,by
pál,pale
pál-os,Palos
pál-os,pale bone
pan,bread
pap,paper
pap-de,page
par,equal
par-de,equally
pat,potato
pecu,special
pecu,unusual
ped,foot
ped-aglo,boot
ped-aglo,shoe
ped-ágra,kick
ped-dig,toe
ped-por,step
pek,sheet
pek-áilem,wool
pek-teg,cotton
pel,shovel
pel,spade
pen,five
pend,stick
pend,hanging
pend-char,glue
pend-char,paste
pend-ku,sticky
per,function
per,use
per,used
per-sa,valuable
per-tas,functionality
per-tas,usage
pinek,brush
pisk,fish
plen-tas,crowd
plen-tas,full
plir,coil
plir,fold
plir-kir,twist
plir-tas,coil
plir-tas,fold
plor,cry
plú,more
plú,most
plú,much
plú-ben,better
plum,feather
poen,regret
poen,repent
poen-tas,repentance
poen-tas,regret
pons,bridge
por,motion
por,move
por,movement; moving; bring; transport
por,moving; bring; transport
por,bring; transport
por,transport
por-áilem,take
por-áilem,remove
por-an-do,push
por-char,leg
por-in,asborb
por-lem,porter
por-mír,stream
por-mír,river
porci,pig
pos,follow
pos,after
pos-an-do,forward
pos-tim,future
pos-tim,will
pos-tim,shall
pot,weight
prae,before
prae,precede
prae-jist,history
prae-tim,past
prae-tim,was
prae-tim,ago
prae-tim-de,ancient
praen,grip
praen-char,net
predi,property
presk,almost
prí,one
prí,unity
prí,first
prí-de,single
prí-de-kans,meal
prí-in,unify
prí-lem,lord
prí-lem,queen
prí-lem,king
prí-lem,ruler
prí-tas,singularity
prí-tas,unit
prí-te,rule
prol,descendant
prop,intention
prop,objective
prop,plan
prop,purpose
pud,powder
pul,chicken
pul,fowl
pulker,beautiful
pulker-mo,poem
pupit,desk
pupit-de,drawer
pur,simple
pur,clear
pur-sed,bench
purg,clean
purg,wash
purg-áilem,soap
purg-ku,clear
purg-te-kap,bath
purg-zen-tu,bathe
kua,as
kua,which
kua,what
qua,as
qua,which
qua,what
qua-lem,who
qua-lem,some
qua-ter,where
qua-tim,when
qua-wís,why
qua-wís,because
qua-wís,reason
quad,square
quad,cube
kuad,cube
kuad,square
quae,trouble
quae,problem
kuad,trouble
kuad,problem
quaeven,Quaeven
quan,Quan
quant,degree
quant,size
quar,four
kuar,four
kuas,illusion
kuas,illusionary
quas,illusion
quas,illusionary
quas-áilem,duplicate
quas-korp,fear
quas-korp,illusion of death
quas-rep-ku,mixed
quas-rep-ku,mix
quas-zen,clone
quí,any
quí,anything
kui,any
kui,anything
quó,how
kuo,how
ra,valor
rad,base
rap,urgent
rap,quick
rap,current
rap,now
rap-curo,dash
rap-curo,flee
rap-sa,available
rap-sa,handy
rap-sa,ready
rap-tim,quickly approaching
rap-tim,nigh
rap-tim,almost
rati,account
ratitas,account
re,in order to
re,to
re,to begin
re,will
re,shall
re-in,begin
re-por,transport
re-por,take
re-por,carry
re-te,have
re-te,possess
rea,react
rea,respond
rea-tas,reaction
rea-tas,response
rec,erect
rec,straight
reg,home
reg,house
reg-char,room
reg-vas-uus,roof
rei,business
rei,event
rei,industry
rel,change
rel,changing
rel-por,moongate
rel-por,moongate travel
rem,gift
rem,prize
rem,reward
rep,frame
rep,structure
rep-ku,together
res,answer
reskí,remember
reski-tas,memory
rig,hard
rig,stiff
rig-an-flam,ice
rig-kans,nut
rig-teg,shell
rig-teg,animal skin
rig-teg,scale
rir,laugh
rit,ritual
rót,turn
rú,red
rúneb,Runeb
sá,can
sá,able
sá,may
sá-est,possible
sab,taste
sac,sugar
sac-ku,sugary
sac-ku,sweet
sadis,pain
sadis,torture
sadis-túrn,dungeon
saengkt,bless
saengkt,force
saengkt,protection
saeykt,bless
saeykt,force
saeykt,protection
saengkt-grav,force field
saengkt-lor,invisibility
saengkt-lor,invisible
saep,seal
saep,stamp
saf,yellow
sal,spring
sal,forth
sal,jump
sarbo,coal
sarp,serpent
sarp,snake
sarp-an-zen-ex-lem,Snakecharmer
sarp-arí-lem,berserker
satis,enough
satis,adequate
sarpling,Sarpling
sed-tas,chair
sed-tas,seat
seg,grain
seg,seed
sek,two
sek,both
sek,second
sek-de,other
sel,choose
sel,select
sel-tas,selection
sel-tas,choice
sem,seven
sem-de,seventh
sem-lor-tim,week
semi,half
sent,feel
sent,feeling
sep,cover
sept,north
sera,bar
sera,fence
sera,rail
sera,rod
setil,basin
setil,bucket
sev,intense
sev,serious
sev,stern
sev,strict
sev-rem,offer
sev-rem,proposal
sev-rem,suggestion
si,if
si,whether
si-par,compare
si-par,comparison
sik,dry
sik-solu,sand
sil,star
sil,astrology
sil,prediction
silámo,Silamo
simi,gorilla
simi,monkey
síní,blue
sinvráal,Sin'Vraal
sit,lie
sit,lie
skel,calamity
skel,crime
skel-lem,criminal
skel-lem-reg,prison
skí,know
skí,knowledge
skí,tell
skí-tas,intelligence
skí-tas,knowledge
skis,crack
skis,cut
skis,divide
skis,tear apart
skis,separate
skis-char,scissors
skis-char,tool
skis-char,shears
skis-tas,division
skrí,print
skrí,write
skrí,writing
skrí-lem,writer
sku,shield
slaskow,Slaskow
sol,only
sol,but
solu,floor
som,cost
som,price
som,value
som-ku,costly
som-teks,silk
son,sound
son-de,music
son-lem,musician
sop,dismay
sop,shock
sop,confound
sor,sister
spak,distance
spak,space
spec,kind
spec,type
spec,sort (n)
sper,anticipate
sper,await
sper,hope
squa,balance
squa,level
squa,scale
stat,condition
ster,sneeze
stul,foolish
sub,grin
sub,nod
sub,smile
subi,hasty
subi,sudden
subi,unexpected
súm,suppose
summ,honor
suo,stitch
suo-tas,stitch
suo-teks,clothe
súr,sun
ta,shoot
ta-re-por,boomerang
tab,card
tabil,board
tablap,slab
tam,nevertheless
tam,still
tan,touch
tas,quality
te,present tense of verbs
te,action in progress
te,in
te-in,continue
te-mání,survive
te-mání-tas,survival
te-per-tas,persistence
teg,skin
teg-skis,shear
teg-vul,scar
teks,cloth
tem,storm
tem-ágra,thunder
ten,have
ten-te,has
ter,place
ter-alt,interior
ter-alt,bowels
ter-alt,deep inside earth
ter-áilem,plane
ter-ánte,entrance
ter-ánte,mouth
ter-ánte,cave mouth
ter-ark,hiding place
ter-esta,there
ter-flam,fireplace
ter-húr,sky
ter-húr-mir,rain
ter-init,original
ter-init,originally
ter-ista,here
ter-ista,present
ter-ista-por,come
ter-mír,lake
ter-múr,world
ter-ort,temple
ter-ort,shrine
ter-per-tas,persistence
ter-por,reach
ter-reg,earth
ter-reg,land
ter-reg-wís-lor,map
ter-te,place
ter-te,put
ter-vas-arb,forest
ter-zú,bed
teregus,Teregus
thor,chest
thor,body
thor-teks,tunic
thor-teks,shirt
tib,flute
tib,pipe
tim,time
tim,wait
tim-por,arrive
tim-por,come
tim-spak,rhythm
tim-te,waiting
tim-te,timing
ting,color
ting,shade
ting-teks,banner
tint,adorn
tir,stretch
tir-ku,elastic
tir-ku,stretchy
ton,note
trak,to
trak,toward
trak,for
trak,unto
trak-por,pull
trak-por,draw
trak-tas,direction
trámel,Trammel
trámel,the moon
trav,work
trav-ter,office
trax,across
trí,interesting
tú,all
tú-tas,whole
tú-tim,always
tú-tim,forever
túrn,cave
ú,you
ú-de,your
ú-de,yours
úi-de,our
úi-de,ours
úilem,us
úilem,we
ul,final
ul,last
ul-tim,ultimate
úlem,you
úlem,you and they
úlem,you-all
um,shadow
un-lem,shade
un-lem,ghost
umor,liquid
umor-flam,lava
umor-kans,soup
ún,control
ung,claw
ungo,annoint
ungo,run
ungo,smear
unq,ever
ura,breath
ura-char,nose
uri,east
urs,bear
urs,animal
us,diligence
us-ágra-lem,general
us-ágra-lem,military leader
us-ágra-lem,troop-leader
us-arb-vas-lem,agriculture leader
us-arb-vas-lem,leader of farmers
usu,experiment
usu-de,experience
usu-lem,expert
ut,a
úus,expand
úus,increase
úus,lift
úus,up
úus,raise
úus-lem,leader
úus-lem,chief
úus-por,ascend
úus-tas,expansion
uy,claw
vaglem,wanderer
vaglem,wandering
vak,cow
vak-mání-áilem,cheese
vak-mir,milk
val,curtain
válkadesh,Valkadesh
vas,great
vas,big
vas,long
vas,ultimate
vas-áilem,everything
vas-an-ben,plague
vas-an-lai,grieve
vas-an-lai,mourn
vas-an-lor,eclipse
var-an-ort,mass dispel
vas-ang,choke
vas-arb,tree
vas-arg-sarp,silver serpent
vas-bal,cruel
var-cur,carriage
vas-des,bottom
vas-feb,feeble
vas-feb,fragile
vas-feb,frail
vas-fu,demented
vas-fu,insane
vas-kap,chest
vas-kap,container
vas-korp,lethal
vas-korp-ágra,battle
vas-korp-ágra,war
vas-korp-nox,lethal poison
vas-ku,fat
vas-leb,cauldron
vas-mír,ocean
vas-mír-an-nax,greater cure potion
vas-mír-mání,greater heal potion
vas-mír-nox,greater poison
var-múr-om,nation
vas-por-áilem,earthquake
vas-por-áilem,tremor
vas-pos-tim,late
vas-prae-tim,early
vas-quas,confusion
vas-son,loud
vas-ter-reg,country
vas-tim,old
vas-tim,age
vas-tim,epoch
vas-tim,great time
vas-úus,elevated
vas-úus,high
vas-úus,top
vas-wís,great knowledge
vas-wís,knowledge
vas-wís,ultimate wisdom
vas-wís,wisdom
vasagralem,Vasagralem
ve,like
ve,as
ved,sell
ved-lem,vendor
ved-ter,market
ved-ter,shop
ved-ter,store
ved-ter-de,merchandise
ved-ter-de,stock
veh,brutal
veh,ferocious
veh,savage
veh,violent
vel,even
vel,flat
ven,discover
ven,find
ven-tas,discovery
ver,true
ver,truth
ver,right
ver-de,truly
ver-in-de,perfect
ter-tas,fact
ver-vid,heed
ver-vid,respect
vers,all right
vers,ok
ves,west
vest,search
vest-tas,quest
vestas,quest
vex,annoy
vex,disturb
vex,jolt
vex,shake
vía,path
vía,course
vía,road
vici,exchange
vici,trade
vid,see
vid,look
vid,view
vid,eye
vid-ku,seem
vid-lem,seer
vid-dúk,point
viduk,point
vidúk-tas,mark
vidúk-tas,sign
vil,cheap
vil,common
vil,little
vil,poor
vil-de,less
vil-de,least
vil-lem,servant
vil-ved,sale
vin,wine
vin-arb,vines
vink,chain
vír,green
vír-mír,swamp
vit,glass
vol,fly
vol,wing
vol-de,winged
vórtex,vortex
vórteks,vortex
vox,voice
vul,injury
vul,wound
wí,us
wí,we
wíde,our
wílem,all of us
wílem,us
wílem,we
wís,know
wís,knowledge
wís,wise
wís,wisdom
wís,intelligent
wís-char,head
wís-char,face
wís-de,wisely
wís-lem,scholar
wís-lem-reg,school
wís-lor,see
wís-lor,vision
wís-lor,image
wís-lor,picture
wíslem,Wislem
wíssúr,Wis Sur
zash,something
zash,somewhat
zaw,something
zaw,somewhat
zen,creature
zen,being
zen,animal
zen,existence
zen-crin,fur
zen-for-tas,muscle
zen-korp,undead
zen-korp,daemon
zen-korp,zombie
zen-ku,physical
zen-lem,pet
zen-múr,race
zen-múr,people
zen-múr,person
zen-múr-int,meet
zen-múr-int,meeting
zen-teg,leather
zen-tú,body
zhah,Zhah
zhel,iron
zel,iron
zhel-kas,Zhelkas
zhel-kas,iron helm
zhen,family
xen,family
zú,sleep
zú-áilem,sleep dust
zú-ku,sleepy
zú-ku,tired
zú-tim,winter
Extra stuff
Perl program from http://martin.brenner.de/ultima/
Tip : download gargish font from https://www.wfonts.com/font/gargish
#!/usr/bin/perl
# Dictionary of the Gargish language
#
# This script has several options to display the dictionary database
#
# no args displays the whole database in three colums,
# Gargish script, Gargish in english alphabet, English.
#
# ?english=word displays all matches of <word> in the
# database.
#
# ?gargish=word displays all matches of <word> in the
# database. This tolerates several ways to write gargish words,
# extends x, q, w to their counterparts, ignores spaces between
# gargish syllables and of course accepts kl, ch, zh etc.
#
# ?add&gargish=gword&english=eword adds a suggested phrase
# to the suggestion file.
#
#
#
# special syllables have extra characters
# 9 == gl
# 5 == sh
# G == ng
# Z == zh
# C == ch
# K == kl
$dictfile = 'gargdict.txt';
%extrachars = (
'9', '<i>gl</i>',
'5', '<i>sh</i>',
'G', '<i>ng</i>',
'Z', '<i>zh</i>',
'C', '<i>ch</i>',
'K', '<i>kl</i>',
);
%gifs = (
'a','<IMG SRC="a.gif" HEIGHT=26 WIDTH=17>',
'b','<IMG SRC="b.gif" HEIGHT=26 WIDTH=17>',
'c','<IMG SRC="b.gif" HEIGHT=26 WIDTH=17>',
'C','<IMG SRC="ch.gif" HEIGHT=26 WIDTH=16>',
'd','<IMG SRC="d.gif" HEIGHT=26 WIDTH=17>',
'e','<IMG SRC="e.gif" HEIGHT=26 WIDTH=17>',
'f','<IMG SRC="f.gif" HEIGHT=26 WIDTH=17>',
'g','<IMG SRC="g.gif" HEIGHT=26 WIDTH=17>',
'9','<IMG SRC="gl.gif" HEIGHT=26 WIDTH=17>',
'h','<IMG SRC="h.gif" HEIGHT=26 WIDTH=17>',
'H','<IMG SRC="hl.gif" HEIGHT=26 WIDTH=17>',
'i','<IMG SRC="i.gif" HEIGHT=26 WIDTH=15>',
'j','<IMG SRC="j.gif" HEIGHT=26 WIDTH=16>',
'k','<IMG SRC="k.gif" HEIGHT=26 WIDTH=17>',
'K','<IMG SRC="kl.gif" HEIGHT=26 WIDTH=17>',
'l','<IMG SRC="l.gif" HEIGHT=26 WIDTH=17>',
'm','<IMG SRC="m.gif" HEIGHT=26 WIDTH=17>',
'n','<IMG SRC="n.gif" HEIGHT=26 WIDTH=17>',
'G','<IMG SRC="ng.gif" HEIGHT=26 WIDTH=17>',
'N','<IMG SRC="nl.gif" HEIGHT=26 WIDTH=17>',
'Y','<IMG SRC="ny.gif" HEIGHT=26 WIDTH=16>',
'o','<IMG SRC="o.gif" HEIGHT=26 WIDTH=17>',
'p','<IMG SRC="p.gif" HEIGHT=26 WIDTH=17>',
'r','<IMG SRC="r.gif" HEIGHT=26 WIDTH=17>',
's','<IMG SRC="s.gif" HEIGHT=26 WIDTH=17>',
'5','<IMG SRC="sh.gif" HEIGHT=26 WIDTH=16>',
't','<IMG SRC="t.gif" HEIGHT=26 WIDTH=17>',
'u','<IMG SRC="u.gif" HEIGHT=26 WIDTH=17>',
'v','<IMG SRC="v.gif" HEIGHT=26 WIDTH=17>',
'z','<IMG SRC="z.gif" HEIGHT=26 WIDTH=17>',
'Z','<IMG SRC="zh.gif" HEIGHT=26 WIDTH=16>',
':','<IMG SRC="dpunkt.gif" HEIGHT=26 WIDTH=13>',
'/','<IMG SRC="minus.gif" HEIGHT=26 WIDTH=15>',
'.','<IMG SRC="punkt.gif" HEIGHT=26 WIDTH=14>',
'-','<IMG SRC="space.gif" HEIGHT=26 WIDTH=10>',
' ','<IMG SRC="space.gif" HEIGHT=26 WIDTH=10>',
);
$query_string = $ENV{'QUERY_STRING'};
$path_info = $ENV{'PATH_INFO'};
$script_name = $ENV{'SCRIPT_NAME'};
$hostname = $ENV{'HTTP_HOST'};
&parse_form_data(*OPTIONS);
print "Content-type: text/html","\n\n";
print "<HTML>\n";
print "<HEAD><TITLE>Gargish Dictionary</TITLE></HEAD>\n";
print qq|<BODY BGCOLOR="#ffffff">\n|;
if (!$OPTIONS{'noscript'}) {
&printjavascript();
}
print "<H1>",&makerunes("gar9-liG-kodeks"),"</H1>\n";
print "<H1>Gargish Dictionary</H1>\n";
# load dictionary from file
if (open(DICT, "<" . $dictfile)) {
print "<table>\n";
print qq|<tr><td>|,&makerunes("gar9-liG"),qq|<td><b>gar<i>gl</i>-li<i>ng</i></b><td><b>English</b>\n|;
while (<DICT>) {
next if /^#/;
($gargish, $english) = split(/\t/,$_);
$runes = &makerunes($gargish);
$gargish =~ s/'([auieo])/\&$1acute;/g;
$gargish =~ s/([95GZCK])/$extrachars{$1}/g;
$english =~ s/;/; /g;
print "<tr><td>$runes<td>$gargish<td>$english\n";
}
print "</table>\n";
close(DICT);
}
#print "</body></html>\n";
&print_footer();
exit(0);
#------------------------------------------------------------------
sub makerunes
{
($garg) = @_;
local($rune, $c, $ex);
$rune = '';
if ($OPTIONS{'noscript'}) {
while ($garg) {
$c = chop($garg);
next if $c =~/'/;
$ex = '???' unless $ex = $gifs{$c};
$rune = qq|$ex$rune|;
}
}
else {
$rune = qq|<SCRIPT language="JavaScript">\nprintgarg("$garg");\n</SCRIPT>|;
}
return $rune;
}
sub printjavascript
{
print <<End_of_Script;
<SCRIPT language="JavaScript">
function printgarg(text)
{
var len = text.length;
var inword = 0;
for (i = 0; i < len; ++i) {
c = text.substring(i, i+1);
width = 17;
switch (c) {
case "9": c = "gl"; break;
case "C": c = "ch"; width = 16; break;
case "H": c = "hl"; break;
case "i": width = 15; break;
case "K": c = "kl"; break;
case "G": c = "ng"; break;
case "N": c = "nl"; break;
case "Y": c = "ny"; width = 16; break;
case "5": c = "sh"; width = 16; break;
case "Z": c = "zh"; width = 16; break;
case ":": c = "dpunkt"; width = 13; break;
case "/": c = "minus"; width = 15; break;
case ".": c = "punkt"; width = 14; break;
case "-":
case " ": c = "space"; width = 10; break;
}
if (c == "space") {
if (inword) {
document.write("</nobr>\\n");
inword = 0;
}
}
else if (c == "\\'") {
continue;
}
else {
if (!inword) {
document.write("<nobr>");
inword = 1;
}
}
document.write("<IMG SRC=\\""+c+".gif\\" HEIGHT=26 WIDTH="+width+">");
}
}
</SCRIPT>
<NOSCRIPT>
<p>Your browser must support JavaScript to see the page properly!</p>
</NOSCRIPT>
End_of_Script
}
#------------------------------------------------------------------
sub print_footer
{
print "<hr>\n";
@crtime = localtime;
$ctime = &mydtime(@crtime);
print "Automatically generated ", $ctime,
qq| <a href="mailto:Martin\@Brenner.de">Martin\@Brenner.de</a><p>\n|;
@starr = stat($dictfile);
@filetime = localtime($starr[9]);
$ctime = &mydtime(@filetime);
print "Dictionary last updated ", $ctime, ".</p>\n";
print "</BODY></HTML>\n";
}
#------------------------------------------------------------------
# myctime() return ctime() style date string from date/time array
sub myctime
{
($mysec,$mymin,$myhour,$mymday,$mymon,$myyear, $mywday) = @_;
return sprintf(
('Sun','Mon','Tue','Wed','Thu','Fri','Sat','Sun')[$mywday]." ".
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep',
'Oct','Nov','Dec')[$mymon]." %d d:d:d 19d",
$mymday, $myhour, $mymin, $mysec, $myyear);
}
sub mydtime
{
($mysec,$mymin,$myhour,$mymday,$mymon,$myyear, $mywday) = @_;
return sprintf("d-".
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep',
'Oct','Nov','Dec')[$mymon]."-d d:d:d",
$mymday, $myyear, $myhour, $mymin, $mysec);
}
#------------------------------------------------------------------
sub parse_form_data
{
local (*FORM_DATA) = @_;
local ($request_method, $query_string, @key_value_pairs);
local ($key_value, $key, $value);
$request_method = $ENV{'REQUEST_METHOD'};
if ($request_method eq "GET") {
$query_string = $ENV{'QUERY_STRING'};
} elsif ($request_method eq "POST") {
read(STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
} else {
&return_error(500, $error, "Unknown method used.");
}
@key_value_pairs = split(/&/, $query_string);
foreach $key_value (@key_value_pairs) {
($key, $value) = split(/=/, $key_value);
$value =~ tr/+/ /;
$value =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C", hex($1))/eg;
if (defined($FORM_DATA{$key})) {
$FORM_DATA{$key} = join("\0", $FORM_DATA{$key}, $value);
} else {
$FORM_DATA{$key} = $value;
}
}
}
sub return_error
{
local ($status, $keyword, $message) = @_;
print "Content-type: text/html\n";
print "Status: ", $status, " ", $keyword, "\n\n";
print <<End_of_Error;
<HTML><HEAD>
<TITLE>CGI programm unexpected error</TITLE>
</HEAD>
<BODY>
<H1>$keyword</H1>
<hr>$message</hr>
Further information from $webmaster.
</BODY></HTML>
End_of_Error
exit(1);
}
See also : Golang : Simple Jawi(Yawi) to Rumi(Latin/Romanize) converter
By Adam Ng(黃武俊)
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+12.8k Golang : Skip blank/empty lines in CSV file and trim whitespaces example
+20.4k Golang : Convert date string to variants of time.Time type examples
+9.8k Golang : Bcrypting password
+9.4k Golang : Qt get screen resolution and display on center example
+6.3k Golang : Totalize or add-up an array or slice example
+10.6k PHP : Convert(cast) bigInt to string
+6.5k Golang : Humanize and Titleize functions
+5.5k Linux/Unix/PHP : Restart PHP-FPM
+16k Golang : Find out mime type from bytes in buffer
+8.1k Golang : Count leading or ending zeros(any item of interest) example
+8.8k Golang : How to use Gorilla webtoolkit context package properly
+7.7k Findstr command the Grep equivalent for Windows