Activity Streams/Primer/Language mapping
Appearance
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 ofnamesummaryMap: multi-lingual equivalent ofsummarycontentMap: 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
*Mapproperty to convey the different versions of value in different languages. - Use the
name,summaryandcontentproperties as a default fallback for consumers that do not understand the*Mapproperties or that do not have a consumer-side language to use for choosing the right value.
Recommendations for consumers
- Use the
*Mapproperty to extract the property value for your user in their own language, if available. - Use the
name,summaryandcontentproperties as a default fallback if the*Mapproperty is not available, or if the map does not include the language of your user's choice.