Skip to content

Commit

Permalink
Add section on expressing language information in JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Oct 21, 2023
1 parent a3ea347 commit 61c608c
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4164,6 +4164,47 @@ <h2>Internationalization Considerations</h2>
the data that is being secured, and not this specification.
</p>

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

<p>
There is currently no standard way to express language and text direction
information in JSON. Implementers and authors are urged to read guidance
regarding the expression of internationalized string values in the "Strings on
the Web: Language and Direction Metadata" document [[?STRING-META]].
</p>

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

<pre class="example nohighlight"
title="An example of a JSON 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": "zQeVbY4oey5q2M3XKaxup3tmzN4DRFTLVqpLMweBrSxMY2xHX5XTYV<wbr>8nQApmEcqaqA3Q1gVHMrXFkXJeV6doDwLWx"
}
}
</pre>
</section>

</section>

Expand Down

0 comments on commit 61c608c

Please sign in to comment.