Activity Streams/Primer/Language mapping
< Activity Streams | Primer
Activity Streams 2.0 includes three properties for representing multi-language properties of an object. Each one corresponds to a single-language property.
nameMap
: multi-lingual equivalent ofname
summaryMap
: multi-lingual equivalent ofsummary
contentMap
: multi-lingual equivalent ofcontent
The mechanics of using these properties are well-defined in the Natural Language Values.
Because these *Map properties are so closely connected to their equivalent unilingual properties, they are not listed in the set of properties in the Activity Vocabulary. This can be confusing for some developers, who are looking to the vocabulary for the definition of all properties. Sorry!
Recommendations for publishers
- Use the
*Map
property to convey the different versions of value in different languages. - Use the
name
,summary
andcontent
properties as a default fallback for consumers that do not understand the*Map
properties or that do not have a consumer-side language to use for choosing the right value.
Recommendations for consumers
- Use the
*Map
property to extract the property value for your user in their own language, if available. - Use the
name
,summary
andcontent
properties as a default fallback if the*Map
property is not available, or if the map does not include the language of your user's choice.