aUCBLogo Demos and Tests / translate_help
setCaseIgnored false
be translate_help
;clearText
language="de
load word language "/startup.lg
startup_de
load "en/startup.lg
startup_en
setCaseIgnored false
translation_en_de=reverse translation_de
foreach tolist translation_en
[ t=translation_en_de.(?.2)
if t != []
[ i=?.1
; (pr i t)
translation_en_de.i=t
i=lowercase ?.1
translation_en_de.i=t
i=uppercase ?.1
translation_en_de.i=t
]
]
translation_en_de=(merge
lowerCase translation_en_de
translation_en_de)
translation_en_de=(merge
upperCase translation_en_de
translation_en_de)
; print translation_en_de
fl=(files [aucblogo.hrf])
foreach fl
[ translateFile ?
]
be translateFile in
out=(word language "/ in "_ language ".txt)
(print in "=> out)
openRead in
setReader in
openWrite out
setWriter out
l=array readListFlatRaw
repeat count l
[ w=l.repcount
t=translation_en_de.w
ifelse t != []
[ (type t)
][ (type w)
]
]
setReader []
close in
setWriter []
close out
end
end