![](https://secure.gravatar.com/avatar/4a68af71fe5327c72564458ef9d00c6b.jpg?s=120&d=mm&r=g)
Probably something with your font/alignment switching.
Yes, probably, but this switching is necessary, look at your example: It gives wrong aligning of the arabic letters (left to right instead of right to left), so at some point one has to inject a \setupalign[r2l], but all my tries only gave this one as a correct result: \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} But that as mentioned looses all other databse entries except the first. Some hints where to make the r2l-switch with getting the same result?
There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Thank you, if some day one is available, I will use it. Or wil learn Lua, right, should be a very basic function to implement.
Huseyin Özoguz E-Mail: h.oezoguz@mmnetz.de Am 03.12.2018 um 18:34 schrieb Wolfgang Schuster:
Huseyin Özoguz schrieb am 03.12.18 um 17:47:
Before you write your own commands try to use what is available.
Right, but in many cases I am just not aware of what is available, to be honest, though I quite often use the wikigarden.
I tried to change your example into arabic-german, seems to work, except only the first translation-pair is shown (see attachment). Why?
\usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer
\define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}}
\definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText]
\setupinterlinespace[line=8ex]
\setupruby[voffset=-3ex]
\starttext \definedfont[file:arial*arabic at 16 pt] \processdatabasebuffer[interlineartext][sample] \stoptext
Probably something with your font/alignment switching.
\usemodule [database]
\startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer
\define[2]\InterlinearText {\ruby{#1}{#2} }
% \defineruby % [interlineartext] % [style=] % % \define[2]\InterlinearText % {\ruby[interlineartext]{#1}{#2} }
\definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText]
\setupinterlinespace[line=8ex]
\definefontfamily [arial] [ss] [Arial] [features=arabic]
\setupbodyfont [arial,16pt]
\starttext \processdatabasebuffer[interlineartext][sample] \stoptext
And second: Of course it would be best readable, if one could write instead
\startbuffer[sample] "قال","(Es) sagte" \stopbuffer
but with same output, s.t. the order of the words in the second database-element is inverted. Is that possible?
There is no command which changes the order of words in a sentence but this should be easy with a short Lua function.
Wolfgang