Transliterate English text using the Greek alphabet: Difference between revisions
Transliterate English text using the Greek alphabet (view source)
Revision as of 01:12, 25 June 2022
, 1 year ago→{{header|Phix}}: looks a bit better with constant first
m (→{{header|Wren}}: Oops) |
m (→{{header|Phix}}: looks a bit better with constant first) |
||
Line 157:
<!--<lang Phix>(phixonline)-->
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #008080;">
alpha a▼
beta b or v▼
gamma g▼
delta d▼
epsilon e (but not ee)▼
zeta z▼
eta h or ee (but not ch, kh, ph, rh or th)▼
theta th▼
iota i or j▼
kappa c, k, q or ck (but not ch and kh)▼
lambda l▼
mu m▼
nu n▼
xi x▼
omicron o (but not oo)▼
pi p (but not ph or ps)▼
rho r or rh▼
sigma s (but not ps)▼
tau t (but not th)▼
upsilon u or y▼
phi f or ph▼
chi ch or kh▼
psi ps▼
omega w or oo▼
"""</span>
<span style="color: #008080;">function</span> <span style="color: #000000;">rules</span><span style="color: #0000FF;">()</span>
<span style="color: #004080;">sequence</span> <span style="color: #000000;">replacements</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">split</span><span style="color: #0000FF;">(</span><span style="color: #000000;">task</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"\n"</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">i</span><span style="color: #0000FF;">,</span><span style="color: #000000;">s</span> <span style="color: #008080;">in</span> <span style="color: #000000;">replacements</span> <span style="color: #008080;">do</span>
Line 196 ⟶ 223:
<span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
<span style="color: #008080;">constant</span> <span style="color: #
▲ alpha a
▲ beta b or v
▲ gamma g
▲ delta d
▲ epsilon e (but not ee)
▲ zeta z
▲ eta h or ee (but not ch, kh, ph, rh or th)
▲ theta th
▲ iota i or j
▲ kappa c, k, q or ck (but not ch and kh)
▲ lambda l
▲ mu m
▲ nu n
▲ xi x
▲ omicron o (but not oo)
▲ pi p (but not ph or ps)
▲ rho r or rh
▲ sigma s (but not ps)
▲ tau t (but not th)
▲ upsilon u or y
▲ phi f or ph
▲ chi ch or kh
▲ psi ps
▲ omega w or oo
<span style="color: #000000;">gulp</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">utf8_to_utf32</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ"</span><span style="color: #0000FF;">&</span>
<span style="color: #008000;">"αβγδεζηθικλμνξοπρστυφχψω ,.\n"</span><span style="color: #0000FF;">),</span>
|