From 5e1822b835f5e485f19d77c22d304fa37526e51b Mon Sep 17 00:00:00 2001 From: Ege Korkan Date: Wed, 29 May 2024 20:22:01 +0300 Subject: [PATCH] add steps to implement text direction parsing --- index.html | 29 +++++++++++++++++++++++++++-- index.template.html | 29 +++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index a0727e71..fc1aec2d 100644 --- a/index.html +++ b/index.html @@ -4831,9 +4831,34 @@

Human-Readable Metadata

For the MultiLanguage Map, TD Consumers MAY infer the base direction from the language tag of the individual strings. - The example below illustrates the use of the @direction 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.

+
    +
  1. + File-level metadata: Use the values of @direction found in the @context. +
  2. +
  3. + Guess from language: Use the value of @language and then guess the direction of the + text +
  4. +
  5. + First-strong:Use the first strongly-directional character in a string. This is equivalent to using + dir=auto in HTML attributes. +
  6. +
+ +

+ 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. +

+ +

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

+
 			{
         "@context": [
diff --git a/index.template.html b/index.template.html
index 12aa5129..3d2ad997 100644
--- a/index.template.html
+++ b/index.template.html
@@ -1836,9 +1836,34 @@ 

Human-Readable Metadata

For the MultiLanguage Map, TD Consumers MAY infer the base direction from the language tag of the individual strings. - The example below illustrates the use of the @direction 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.

+
    +
  1. + File-level metadata: Use the values of @direction found in the @context. +
  2. +
  3. + Guess from language: Use the value of @language and then guess the direction of the + text +
  4. +
  5. + First-strong:Use the first strongly-directional character in a string. This is equivalent to using + dir=auto in HTML attributes. +
  6. +
+ +

+ 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. +

+ +

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

+
 			{
         "@context": [