Skip to content

Commit

Permalink
Add section on internationalization in JSON-LD.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Oct 21, 2023
1 parent 61c608c commit 242c744
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4165,7 +4165,7 @@ <h2>Internationalization Considerations</h2>
</p>

<section>
<h2>Expressing Language Information in JSON</h2>
<h2>Internationalization in JSON</h2>

<p>
There is currently no standard way to express language and text direction
Expand Down Expand Up @@ -4206,6 +4206,49 @@ <h2>Expressing Language Information in JSON</h2>
</pre>
</section>

<section>
<h2>Internationalization in JSON-LD</h2>

<p>
The JSON-LD format provides a number of mechanisms that enable the expression of
language and text direction metadata. Implementers and authors are urged to read
the section on <a data-cite="JSON-LD11#string-internationalization">
String Internationalization</a> to understand which mechanisms might be of
most use to their use case.
</p>

<p>
The example below is one way in which an author could encode language and text
direction in JSON-LD data that is secured using this specification.
</p>

<pre class="example nohighlight"
title="An example of a JSON-LD document containing internationalized strings">
{
"myWebsite": "https://hello.world.example/",
"title": [{
"@value": "My Website",
"@language": "en"
}, {
"@value": "Mon Site Internet",
"@language": "fr"
}, {
"@value": "موقع الويب الخاص بي",
"@language": "ar",
"@direction": "rtl"
}],
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "jcs-eddsa-2022",
"created": "2023-03-05T19:23:24Z",
"verificationMethod": "https://di.example/issuer#z6MkjLrk3gKS2nnkeWcm<wbr>cxiZPGskmesDpuwRBorgHxUXfxnG",
"proofPurpose": "assertionMethod",
"proofValue": "ztmzN4DRFHX5XTYVQeVbYTLVqpLMweBrSxMY2xup34oey5q2M3XKax<wbr>VHMrXFkXx8nJeV6doDwLWA3Q1gQApmEcqaq"
}
}
</pre>
</section>

</section>

<section class="informative">
Expand Down

0 comments on commit 242c744

Please sign in to comment.