question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The XHTML index.html and content files should use dir="rtl" for Arabic content

See original GitHub issue

The DITA Map has the xml:lang=“ar” set to it. Each topic also has the language set to Arabic. The XHTML generated for each topic contains dir=“rtl” set on the HTML root. But for the TOC the XSL:

        DITA-OT/plugins/org.dita.xhtml/xsl/map2htmtoc/map2htmtocImpl.xsl

in the template:

     <xsl:template name="generate-toc">

does not generate any attribute for the HTML root element. The “DITA-OT/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl” stylesheet defines an XSL template called “bidi-area” which should probably be moved to a common XSLT and used for generting the TOC list of references as well.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
robandercommented, May 3, 2016

Double checked - the DITA specification has a normative reference to RFC 5646 for language identification: https://www.rfc-editor.org/rfc/rfc5646.txt

From section 2.1.1 in that RFC:

At all times, language tags and their subtags, including private use and extensions, are to be treated as case insensitive: there exist conventions for the capitalization of some of the subtags, but these MUST NOT be taken to carry meaning.

Thus, the tag “mn-Cyrl-MN” is not distinct from “MN-cYRL-mn” or “mN- cYrL-Mn” (or any other combination), and each of these variations conveys the same meaning: Mongolian written in the Cyrillic script as used in Mongolia.

0reactions
raducoravucommented, May 25, 2016

Thanks Robert.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Right-to-left Scripts in XHTML and HTML Content
Discussion: Values of right and left in attributes need to be converted when translating the document into a language using the Arabic or...
Read more >
HTML text-direction regarding arabic content. Is using dir="rtl ...
Its would display the text according to how that language is expected to be, rtl is mearnt for arabic and/or hebrews.
Read more >
The dir attribute - OASIS Open
While most languages are written in text where characters flow from left to ... In most cases, authors need to use dir="rtl|ltr" to...
Read more >
<bdo>: The Bidirectional Text Override element - HTML
rtl : Indicates that the text should go in a right-to-left direction. Examples. <!-- Switch text direction --> <p> ...
Read more >
Symbol Codes | Right to Left (RTL) Scripts - Sites at Penn State
Use the code <html dir="rtl" lang=""> to ensure that all paragraphs and headers are right aligned and that the page language is set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found