Page MenuHomePhabricator

RTL in WikiHiero
Open, Needs TriagePublic

Description

Ancient Egyptian hieroglyphs could be written from left-to-right as well as from right-to-left.
Currently, WikiHiero supports only producing LTR hieroglyphs.
Having it able to produce RTL hieroglyphs would make them more suitable for inclusion in wikis in languages written from right to left, such as Arabic, Farsi, etc, where they will have the same reading direction as the main body text.

Event Timeline

The outcome of <hiero> shall reproduce the same graphics as written milleniums ago.

The produced graphics does not depend on writing direction of the language context where such graphics are embedded.

  • If you mention latin words on an arabic or hebrew page, they keep their writing direction. They will be presented as LEFT and not as TFEL.
  • For the same reasons, arabic or hebrew quotations within an english page do not change order of letters (which would break some arabic texts since they depend on neighbouring letters).

For me, the request more suitable for inclusion in wikis in languages written from right to left seems to be invalid.

Another issue are rumours that single hieroglyphs might occur in a mirrored version.

  • It is not proven yet, citation needed.
  • If it turns out that horizontally mirrored single glyphs are really needed, each glyph specifier might be preceded by a - and result in a mirrored variant as e.g. OOUI icons do for RTL business.

When I wrote the original ticket, I was assuming a certain shared understanding of the Egyptian hieroglyphic writing system. So let me clarify:

The outcome of <hiero> shall reproduce the same graphics as written milleniums ago.

Millennia ago, hieroglyphs were written in both directions. There are almost as many samples of writings where the glyphs are drawn facing the right as many that are drawn facing the left. The direction of the glyphs indicates the direction of reading.

The image in Britannica's article on hieroglyphs shows a sample where the direction of writing and reading is left to right: https://www.britannica.com/topic/hieroglyph

There are others sources online, and I have many photos I took myself of monuments that I can share here, if needed.

The produced graphics does not depend on writing direction of the language context where such graphics are embedded.

That would have been true had <hiero> was only being used to reproduced writings from concrete instances, citing their actual material sources. For example, to reproduce the writings from a specific monument or papyrus. But even then writing from right to left is attested, and would be needed here.

However, reproducing actual writings is not even the main usecase of <hiero> in Wikipedia currently, from what I observe. Rather, it is used to re-create the hieroglyphic representations of the names of deities and persons, and could be used to reproduce the names of places, among other uses. In cases like these, where the reproduced hieroglyph is not documenting a specific concrete sample, there's no reason why the hieroglyphic writing not be made to match the direction of reading of the contextual language, i.e Arabic, Farsi, or Hebrew, etc, or even in a Latin script Wikipedia in order to simply demonstrate this property of the writing system itself, where that is relevant.

  • If you mention latin words on an arabic or hebrew page, they keep their writing direction. They will be presented as LEFT and not as TFEL.
  • For the same reasons, arabic or hebrew quotations within an english page do not change order of letters (which would break some arabic texts since they depend on neighbouring letters).

I know about Arabic and Hebrew and many other right-to-left scripts. This reply is irrelevant to what I had written, and to this discussion.

There are three issues which are mixed and confused in this task. They should be distinguished clearly.

The graphical appearance generated by the extension.

  • That shall reproduce exactly what has been put 4000 years ago on a wall or a papyrus.
  • The graphics shall show exactly the same what is visible on a truly oriented photograph.
  • It does not matter at all how these graphical elements are read and interpreted semantically and what they mean.

The source code order

  • When computer code is written in arabic or hebrew or cyrillic or japanese context, it is written in latin letters and it is keeping their writing and reading direction (from left to right) under any circumstances, no matter what the context language might be.
  • The following example is written and read by software from left to right, whatever the context might be.

In the same way the inner code between <hiero> and </hiero> shall produce always the same graphics, no matter what the graphical elements might mean:

function main ( args ) {
    ...
}

The meaning of the text

  • If it is not an historical inscription, but you want to teach someone how to decipher the name of a pharao, how graphical elements are combined to express vowels, syllabes, words, then it might be meaningful to follow the common reading direction, be it arabic or hebrew or latin or cyrillic.
  • In this tutorial you know the language context, and you might choose an appropriate reading direction, and you may arrange the glyphs in helpful and comprehensive order.
  • However, when making a Wiki extension computer code, you are arranging this between <hiero> and </hiero> in latin letters (ASCII) in such order to gain the graphics you are heading for.
  • The extension does not care about the meaning of the generated graphics, and how human beings might interprete them. The software is just translating ASCII tokens into graphics.
  • If you want them to appear in reverse order then arrange the ASCII elements in reverse order.

Unanswered question

The lengthy answer has not answered: single hieroglyphs might occur in a mirrored version.

  • That does mean: In common practice a bird is looking e.g. to the right.
  • That might be the case only if this is semantically read from left to right.
  • If semantically read from right to left: Does it occur that this bird has been painted looking to the left 4000 years ago? Or is he still looking to the right?

If it is proven that mirrored birds occur, we will need mirrored images for single tokens. Then the token should be preceded by a - and some bot needs to produce all non symmetric images with a systematic name variation.