dir
metadata
dir
metadata is declared to indicate a right-to-left writing direction or to mark left-to-right content that is embedded within a right-to-left written file. The value that is assigned to the dir
metadata name must be a recognized value.
You do not need to declare the writing direction in a left-to-right written file, because ltr
is the default anyway.
Recognized values
ltr
- This value indicates that the text is written left-to-right. This is the default and the most common writing direction in the world.
rtl
- This value indicates that the text is written right-to-left. This is the case for Arabic, Hebrew and Persian scripts for example.
Example
The example is a quotation block with an excerpt of a Phoenician sarcophagus inscription. The direction is declared to be rtl
, because the Phoenician script is written right-to-left.
> @ dir: rtl
> 𐤀𐤋 𐤀𐤋 𐤕𐤐𐤕𐤇 𐤏𐤋𐤕𐤉 𐤅𐤀𐤋 𐤕𐤓𐤂𐤆𐤍
𐤀𐤋 𐤀𐤋 𐤕𐤐𐤕𐤇 𐤏𐤋𐤕𐤉 𐤅𐤀𐤋 𐤕𐤓𐤂𐤆𐤍
For developers
If dir
metadata is declared with a value that is not assumed as default anyway, the Aneamal Translator adds a HTML dir attribute in the HTML output. In the example the attribute is added to the HTML blockquote element representing the quotation block:
<blockquote dir='rtl'>
<p>𐤀𐤋 𐤀𐤋 𐤕𐤐𐤕𐤇 𐤏𐤋𐤕𐤉 𐤅𐤀𐤋 𐤕𐤓𐤂𐤆𐤍</p>
</blockquote>