Use Multiple Languages (SG:lang tag)
Content Blocks are generally non-editable when used in a message, except for SG tags and editable links. These can be modified once the Content Block is added to the message.
By using the followingsyntax, you can make the content of a non-editable Content Block language dependent:
<sg:lang value="EN">…</sg:lang>
<sg:lang value="NL" >…</sg:lang>
Example of a Content Block using the SG:lang tag:
Note that these SG tags can only contain HTML. You cannot include other SG tags in an SG:lang tag.
Note: Ensure that the language code used in these SG tags corresponds to the language codes used for the Business unit. Consult your system administrator to obtain these language codes.![]()
Note: If the message has a language code that is not included in the Content Block, no content will be rendered.
Language tags can also be used inside other SG tags. This lets you set language-specific attributes for these SG tags. Only the attributes specific to the user's language will be rendered.
Note: Language-specific attributes have priority over generic attribute values.
- Images — src, href, alt
- Buttons — text, href
Example for an image:
<sg:image id="my_img" style="width:100px">
<sg:lang value="nl" alt="De zon" />
<sg:lang value="fr" alt="Le Soleil" />
</sg:image>
Example for content:
<sg:content id="content-1">
<sg:lang value="NL">Nederlandse content</sg:lang>
<sg:lang value="EN">English content</sg:lang>
</sg:content>
Where value is the language code that needs to correspond to the language of the message in which the Content Block is used.
More information on the use of Content Blocks with multiple languages can be found in this topic.