eeditiones / tei-vanilla

Repository for TEI Vanilla proposal
GNU General Public License v3.0
10 stars 2 forks source link

<lg/> and others #22

Open claudia-sutter opened 3 years ago

claudia-sutter commented 3 years ago

One of our participants in our workshop is working with a source written in Persian, and he wants to edit the text and add a translation.

Please allow this in the schema.

ottosmops commented 3 years ago

Could you please be a little bit more explicit.

Translation should be possible. I think Dantiscus for example has a translation.

adiekjobst commented 3 years ago

Thank you both. I don't think the translation is a problem whatsoever. The question is the Persian text itself, or rather how we work with it. I just tried it in Vanilla and while the xml:lang="ar" is fine, the style direction rtl is not. And from what I know there might also be bidirectional text (embedded), e.g. numbers or foreign words in the text. We can easily fix that but would the fix translate in an out of the box solution in the publisher? My experience with editing rtl text is extremely limited...!

wolfgangmm commented 3 years ago

The @style attribute may contain arbitrary CSS expressions. I would advise against using it. It pollutes the TEI with styling information which should belong elsewhere (external CSS or the ODD). Instead I would suggest to handle the @xml:lang within the ODD transformation and output the corresponding CSS directives there.

I have been working with both, rtl and vertically oriented languages (classic Chinese). rtl works nicely in all modern browsers, even if you switch between ltr and rtl in inline elements (e.g. in a <foreign>).

Unfortunately I can't contribute my Chinese examples due to copyright reasons, but would be happy to help incorporating a Persian example text into the TEI Publisher distribution, so other people can use it for learning.

Conal-Tuohy commented 3 years ago

Another approach I've used in a different project is to make use of TEI's facility to use a CSS selector (such as e.g. :lang(ar) which would select all elements whose language is Arabic) to link a rendition element (containing CSS properties, which might include direction: ltr) to the relevant portions of the text.

<rendition xml:id="arabic" selector=":lang(ar)">direction:ltr</rendition>

...

<p xml:lang="ar">...</p>

The rendition/@selector attribute is a nice feature of TEI which allows style information in a <rendition> to be linked to a large number of elements clearly and concisely. However, it's not widely supported by publishing platforms.

I've recently written code (which I think is fairly portable) to evaluate such selectors and link the rendition elements directly to the elements which they select, producing e.g.

<p xml:lang="ar" rendition="#arabic">...</p>