From 5a9ac080305c5ae388e46ff301c8c36fbd685882 Mon Sep 17 00:00:00 2001
From: Dmitri Zagidulin
The `renderMethod` property is a reserved extension point in the
-[[[VC-DATA-MODEL-2.1]]] specification . An [=issuer=] can utilize this property
+[[[VC-DATA-MODEL-2.1]]] specification. An [=issuer=] can utilize this property
in a [=verifiable credential=] to express one or more preferred render methods.
+One of the core use cases for this specification is the ability to present a
+different rendering payload based on the preferred language or locale of the
+user. This extends beyond the value-level localization offered by the core
+[[VC-DATA-MODEL#internationalization-considerations]] specification, and beyond
+translating field labels. Clients displaying or rendering VCs must be able to
+select arbitrary layouts, styling or full pre-rendered payloads based on the
+user's language and locale preferences.
+ The `renderMethod` Property
The `renderMethod` Property
+ Localization: Selecting on Language and Locale
+
+ SuiteRenderMethod
@@ -370,6 +384,14 @@ SuiteRenderMethod
than `name` of when the particular rendering might be useful.
+
+
targetLanguage
+
+An OPTIONAL [=string=] that designates a language range this render method is
+meant to support (see theMatching
+language and language tags section for more details).
+
+
renderProperty
From 34b599a42fe4a4126808787bd864bc711e2ad802 Mon Sep 17 00:00:00 2001
From: Dmitri Zagidulin
SuiteRenderMethod
-
From 43668788c2ee23c31ca3003080300598b96d75de Mon Sep 17 00:00:00 2001
From: Dmitri Zagidulin targetLanguage
+ inLanguage
-An OPTIONAL [=string=] that designates a language range this render method is
-meant to support (see theMatching
+An OPTIONAL [=string=] that designates a language range (based on
+schema.org/inLanguage) this render
+method is meant to support (see the Matching
language and language tags section for more details).
Localization: Selecting on Language and Locale
select arbitrary layouts, styling or full pre-rendered payloads based on the
user's language and locale preferences.
+In the example below, the `renderMethod` property contains an array of two +`static` render method objects, each providing a pre-rendered PNG image of +the credential. The client selects the one whose `inLanguage` value best +matches the user's language preference. +
+ +
+{
+...
+"renderMethod": [
+ {
+ "type": "SuiteRenderMethod",
+ "renderSuite": "static",
+ "inLanguage": "en",
+ "mediaType": "image/png",
+ "name": "Credential image",
+ "payload": "data:image/png;base64,iVBORw0KGgo...AAAElFTkSuQmCC"
+ },
+ {
+ "type": "SuiteRenderMethod",
+ "renderSuite": "static",
+ "inLanguage": "es",
+ "mediaType": "image/png",
+ "name": "Imagen de la credencial",
+ "payload": "data:image/png;base64,iVBORw0KGgo...AAAElFTkSuQmCC"
+ }
+]
+...
+}
+