Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Informative steps to implement text direction parsing in Consumers #2026

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4831,9 +4831,34 @@ <h3>Human-Readable Metadata</h3>
For the MultiLanguage <a>Map</a>, TD Consumers MAY infer the
<a class="lint-ignore">base direction</a> from the language tag of the individual strings.
</span>
The example below illustrates the use of the <code>@direction</code> term. See [[?json-ld11]] and
[[string-meta]] for more detailed information.
These can be summarized into the steps below that can be implemented by TD Consumers based on the
information provided in a TD.
</p>
<ol>
<li>
<b>File-level metadata:</b> Use the values of <code>@direction</code> found in the <code>@context</code>.
</li>
<li>
<b>Guess from language:</b> Use the value of <code>@language</code> and then guess the direction of the
text
</li>
<li>
<b>First-strong:</b>Use the first strongly-directional character in a string. This is equivalent to using
<code>dir=auto</code> in HTML attributes.
</li>
</ol>

<p class="note">
Please note string-specific direction metadata is not possible in the current version of the specification.
The working group is working on a mechanism to make it possible. After which, that will be the preferred way
to handle text direction for TD Consumers.
</p>

<p>
Additionally, the example below illustrates the use of the <code>@direction</code> and
<code>@language</code> terms. See [[?json-ld11]] and [[string-meta]] for more detailed information.
</p>

<pre class="example">
{
"@context": [
Expand Down
29 changes: 27 additions & 2 deletions index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -1836,9 +1836,34 @@ <h3>Human-Readable Metadata</h3>
For the MultiLanguage <a>Map</a>, TD Consumers MAY infer the
<a class="lint-ignore">base direction</a> from the language tag of the individual strings.
</span>
The example below illustrates the use of the <code>@direction</code> term. See [[?json-ld11]] and
[[string-meta]] for more detailed information.
These can be summarized into the steps below that can be implemented by TD Consumers based on the
information provided in a TD.
</p>
<ol>
<li>
<b>File-level metadata:</b> Use the values of <code>@direction</code> found in the <code>@context</code>.
</li>
<li>
<b>Guess from language:</b> Use the value of <code>@language</code> and then guess the direction of the
text
</li>
<li>
<b>First-strong:</b>Use the first strongly-directional character in a string. This is equivalent to using
<code>dir=auto</code> in HTML attributes.
</li>
</ol>

<p class="note">
Please note string-specific direction metadata is not possible in the current version of the specification.
The working group is working on a mechanism to make it possible. After which, that will be the preferred way
to handle text direction for TD Consumers.
</p>

<p>
Additionally, the example below illustrates the use of the <code>@direction</code> and
<code>@language</code> terms. See [[?json-ld11]] and [[string-meta]] for more detailed information.
</p>

<pre class="example">
{
"@context": [
Expand Down
Loading