Providing multiple language support with dynamic content

<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>
<div class="article-banner" id="suite_gpee">
<table style="margin-left: 0px; margin-right: auto;">
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_pe">
<table style="margin-left: 0px; margin-right: auto;">
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Professional or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="docs-ai-summary">
<p id="docs-ai-summary-toggle">
Verified AI summary <span id="up-triangle">◀</span><span id="down-triangle">▼</span>
</p>
<p id="docs-ai-summary-content">
Dynamic content enables you to support multiple languages by using placeholders in automations, macros, and triggers. Create default text and language variants, which are automatically displayed based on the user's language. Manage translations in-house or via export/import with translation agencies. Use dynamic content in ticket fields, custom statuses, and system messages to streamline multilingual support.
</p>
</div>
<div class="body">
<div class="note fastpath">
<span class="fastpathtitle">Location: </span>
<span class="ph">Admin Center &gt; Workspaces &gt; Agent tools &gt; Dynamic
content</span>
</div>
<p class="p">
To provide multiple language support, you can create dynamic content
that can
then be referenced via a placeholder in automations, macros, triggers,
custom fields, custom agent statuses, and by many of the system generated
messages such as those sent in email notifications when a user creates
an
account.
</p>
<div class="p">
This article covers the following topics:
<ul class="ul" id="topic-1__ul_wpq_pxc_3r">
<li class="li">
<a class="xref" href="#topic_ag4_zgp_2fc">About dynamic
content</a>
</li>
<li class="li">
<a class="xref" href="#topic_qcy_eci_je">Creating dynamic
content and variants</a>
</li>
<li class="li">
<a class="xref" href="#topic_izg_rnv_le">Deleting dynamic
content and variants</a>
</li>
<li class="li">
<a class="xref" href="#topic_hdn_hdi_je">Managing the
translation of your dynamic content</a>
</li>
<li class="li">
<a class="xref" href="#topic_enk_bdi_je">Using your dynamic
content</a>
</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_ag4_zgp_2fc">
<h2 class="title topictitle2" id="ariaid-title2">About dynamic content</h2>
<div class="body">
<p class="p">
To provide multiple language support, you can create dynamic content
that
can then be referenced via a placeholder in automations, macros,
triggers, custom fields, custom agent statuses, and by many of the
system generated messages such as those sent in email notifications
when a user creates an account.
</p>
<p class="p">
As an example of how you can use dynamic content, the text of a message
that
you currently add to a macro can be replaced by a dynamic content
placeholder.
</p>
<p class="p">This text: </p>
<div class="p">
<pre class="pre codeblock wysiwyg-code-block"><code>If you forget your password, just click the "Help! I don't know what to enter here!" link on the login page.

Thanks and have a great day!

The MondoCam Support Team</code></pre>
</div>
<p class="p">Is replaced with this placeholder:</p>
<div class="p">
<pre class="pre codeblock wysiwyg-code-block"><code>{{dc.password_help}}</code></pre>
</div>
<p class="p">
When the macro is applied to a ticket, the content is inserted into
the
ticket. If you're already using Zendesk placeholders, you're already
familiar with how this works. The primary difference between the
Zendesk placeholders and dynamic content is that you define the
content that is dynamically inserted into your business rules and
communications with your customers.
</p>
<p class="p">
Dynamic content is a combination of a default version of the text
(typically in the same language as your default language) and
variants for every other language that you support. In the example
above, the default variant is in English. If your Zendesk also
supports French and German, for example, you create variants for
each of those languages. Then, based on the end user's language,
the
appropriate variant is automatically used when the dynamic content
is referenced and displayed to the end user.
</p>
<p class="p">
If the end user's language is not one of your supported languages,
the
default variant is used.
</p>
<p class="p">
Dynamic content provides you with a way to streamline support for
multiple languages. You reference one placeholder and the
appropriate language is displayed based on the end user's language
preference. How an end user's language is detected is described in
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408888770714#topic_tmu_gno_ze">Setting and detecting a user's
language</a>.
</p>
<p class="p">
Of course when you support multiple languages, you must translate
your
content into the languages you support in your Zendesk. There are
a
number of ways to manage the translation of your default content.
You can create and edit all your language variants directly in your
Zendesk or you can export all your dynamic content and send it off
to a translation agency. You then import the dynamic content back
into your Zendesk and all language variants are added.
</p>
<p class="p">
If you later update the default content, the variants are flagged
as
being potentially out of date with the default content. Meaning that
if you update the default content you probably need to also update
the translations in the variants. When an update is required, you
simply repeat the export and import process to update the content.
See
<a class="xref" href="#topic_hdn_hdi_je">Managing the
translation of your dynamic content</a>.
</p>
<p class="p">
You can also manually set variants to be inactive so that they are
not
used. You might do this if your variant isn't ready to be made
public (for example, if the translation is incomplete or incorrect).
</p>
<p class="p">
Finally, how you use your dynamic content in automations, macros,
and
triggers is tracked so that you have an easy way to monitor their
use.
</p>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_qcy_eci_je">
<h2 class="title topictitle2" id="ariaid-title3">Creating dynamic content and variants</h2>
<div class="body">
<p class="p">
When you create a dynamic content item, you select the default language
and enter the text
of the dynamic content. You then create variants for each of your
supported languages.
</p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_qcy_eci_je__image_ght_hnh_le" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_select_lang.png" width="NaN">
</p>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_j55_5nq_2fc">
<h3 class="title topictitle3" id="ariaid-title4">Creating dynamic content</h3>
<div class="body">
<p class="p">
You can create dynamic content to provide support in multiple
languages.
</p>
<div class="p">
<strong class="ph b">To create a dynamic content item</strong>
<ol class="ol" id="topic_j55_5nq_2fc__ol_oys_aph_le">
<li class="li">
<span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_j55_5nq_2fc__d8e1147" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_workspaces_icon.png">
<strong class="ph b">Workspaces</strong> in the sidebar, then select <strong class="ph b">Agent tools &gt; Dynamic content</strong>.</span>
</li>
<li class="li">
Click <strong class="ph b">Add item</strong>.
</li>
<li class="li">Enter a title for the dynamic content. </li>
<li class="li">
Select the default language.
<div class="p">
<div class="note note">
<span class="notetitle">Note:</span> The list
of languages you can choose from is
based on your default language and the
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408888770714" target="_blank">additional
languages you've chosen to support</a>
in the
<strong class="ph b">Localization</strong> settings
page. You can add
language variants for all of the languages that
Zendesk supports.
</div>
</div>
</li>
<li class="li">
Enter the text of the dynamic content.
<ul class="ul" id="topic_j55_5nq_2fc__ul_bmw_eph_le">
<li class="li">
You can use Zendesk placeholders in your
dynamic content. For example, you can add
placeholders for ticket and user properties.
See
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408886858138" target="_blank">Zendesk data object
(placeholders) reference</a>.
You can also add
other dynamic content placeholders.
</li>
</ul>
</li>
<li class="li">
Click <strong class="ph b">Create</strong>.
</li>
</ol>
</div>
<p class="p">
When you create a dynamic content item, the detail page is
displayed. You
<a class="xref" href="#topic_trk_vqh_le">add variants</a> for
each of your supported
languages to your dynamic content.
</p>
<p class="p">
Below the title of the dynamic content, you'll see the
placeholder that you'll use to refer to this dynamic content
in your automations, macros, triggers, and in system
messages. Dynamic content placeholders always begin with the
'dc' prefix. Once you use the placeholder, you'll see where
it's used in the References section.
</p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_j55_5nq_2fc__image_dit_sbg_ne" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_new_dc.png" width="NaN">
</p>
<p class="p">
You can edit the dynamic content title by clicking Edit. The
text
of your default content, shown in the Variants section, can
be edited by clicking the Edit button in the table row.
</p>
<p class="p">
Changing the title after you've created the dynamic content does
not change the placeholder name. It remains the same
regardless of the subsequent changes you may make to the
title.
</p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested2" id="topic_trk_vqh_le">
<h3 class="title topictitle3" id="ariaid-title5">Creating variants</h3>
<div class="body">
<p class="p">
Variants are different language versions of the default variant
for your dynamic content.
</p>
<div class="p">
<strong class="ph b">To create a variant</strong>
<ol class="ol" id="topic_trk_vqh_le__ol_tgh_tov_le">
<li class="li">
<span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_trk_vqh_le__d8e1147" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_workspaces_icon.png">
<strong class="ph b">Workspaces</strong> in the sidebar, then select <strong class="ph b">Agent tools &gt; Dynamic content</strong>.</span>
</li>
<li class="li">
Click the title of the dynamic content where
you'd like to add a variant.
</li>
<li class="li">
Click <strong class="ph b">Add variant</strong>.
</li>
<li class="li">
Select the variant language.
<p class="p">
The list of
languages you can choose from is based on the
languages you've chosen to support. See
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408827609882" target="_blank">Configuring your
Help Center to support multiple
languages</a>.
</p>
</li>
<li class="li">
Set the variant to <strong class="ph b">Active</strong>
or
<strong class="ph b">Inactive</strong>.
<p class="p">
Active means that the variant
will be used as the text for all users of that
language. When you set a variant to Inactive,
you're disabling its use and users of the inactive
language will instead see the default content
variant. In other words, if the default content is
in English and you make the German variant
inactive, German users see English content.
Typically, you set a variant to inactive if the
variant's content is not ready to be made public
(i.e., the translation is not complete).
</p>
</li>
<li class="li">
You can also optionally set the variant to be
the default variant, which overrides the current
default variant.
<p class="p">
Setting a language variant as
the default variant is useful when you want to
create dynamic content specifically for a group
that supports a language other than your default
language. For example, a Japanese language support
group can set default variants as Japanese. When
you change the default from one variant to
another, the status of the other variants changes
to <strong class="ph b">Out of date</strong>.
</p>
</li>
<li class="li">
Enter the text of the variant language.
<p class="p">
Depending on how you're managing the
translation of the content, you can instead first
create all your dynamic content in your default
language and then export the content and send it
to a translation agency. An export file is created
for each of the languages that your Zendesk
supports. You then import the files back into your
Zendesk and all of the language variants are added
to the dynamic content. For information about
managing the translation workflow, see
<a class="xref" href="#topic_hdn_hdi_je">Managing
the translation of your dynamic content</a>.
</p>
</li>
<li class="li">
Click <strong class="ph b">Create</strong>.
</li>
</ol>
</div>
<p class="p">
Here's an example of the password help dynamic content variant
in German.
</p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_trk_vqh_le__image_gkh_jpv_le" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_new_variant.png" width="NaN">
</p>
<p class="p">When you add variants, they are listed as shown here:</p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_trk_vqh_le__image_ays_wzk_me" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_variants_list.png" width="NaN">
</p>
<p class="p">
In the list of variants, you'll see that the default content
is flagged as the default.
You can edit each variant by clicking
<strong class="ph b">Edit</strong>. You can also delete all the
variants
that are not the default. To delete the default variant you need
to either set a different
variant as the default or delete the entire dynamic content item.
See
<a class="xref" href="#topic_zwx_ojv_le">Deleting dynamic content</a>.
</p>
<div class="p">
The status column in the list shows if the variant is active
or inactive; the selections
you made when creating or updating the variant. Status also conveys
the state of variants
relative to the default variant. When the default variant is
updated and the other
variants are not, the other variants are considered to be out
of date with the default
variant. In other words, it is assumed that if the default variant's
text was updated then
the other variants text should also be updated. To give you an
indication that the text in
the variants may be out of sync with the default variant, they
are flagged as being out of
date. Therefore, you may see the following statuses for your
variants:
<ul class="ul" id="topic_trk_vqh_le__ul_roe_zaw_le">
<li class="li">Active</li>
<li class="li">Inactive</li>
<li class="li">Active (Out of date)</li>
</ul>
</div>
<p class="p">
As described below (<a class="xref" href="#topic_zck_mew_le">Filtering the dynamic
content list by status</a>),
you can quickly view the dynamic content items that
contain variants that are out of date.
</p>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_izg_rnv_le">
<h2 class="title topictitle2" id="ariaid-title6">Deleting dynamic content and variants</h2>
<div class="body">
<p class="p">
You can delete dynamic content or individual variants as needed.
</p>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested2" id="topic_zwx_ojv_le">
<h3 class="title topictitle3" id="ariaid-title7">Deleting dynamic content</h3>
<div class="body">
<p class="p">
You can delete dynamic content only if it is not being referenced
by your automations, macros, or triggers. How your dynamic
content is being used is shown in the References section of
each dynamic content item.
</p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_zwx_ojv_le__image_shg_zek_me" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_references.png" width="NaN">
</p>
<p class="p">
By clicking the link to the reference, you can edit the business
rule and remove the dynamic content placeholder. Once all
the references have been removed, you can delete the dynamic
content item.
</p>
<div class="p">
<div class="note note">
<span class="notetitle">Note:</span> References are only
tracked for automations, macros,
and triggers. If you used a dynamic content
placeholder in a system generated message, you'll
need to track their use manually. If you do delete a
dynamic content item without first removing the
placeholder from the system message, the content
continues to be displayed to users.
</div>
</div>
<div class="p">
<strong class="ph b">To delete a dynamic content item</strong>
<ol class="ol" id="topic_zwx_ojv_le__ol_zwu_agk_me">
<li class="li">
<span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_zwx_ojv_le__d8e1147" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_workspaces_icon.png">
<strong class="ph b">Workspaces</strong> in the sidebar, then select <strong class="ph b">Agent tools &gt; Dynamic content</strong>.</span>
</li>
<li class="li">
Locate the item you want to delete, then click
<strong class="ph b">Delete</strong>.
</li>
<li class="li">
Click <strong class="ph b">OK</strong> to confirm that
you want to
delete the item. If there are no references to the
dynamic content, the item is deleted. If there are
references, the item is not deleted. You can then
remove the references and delete the item.
</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested2" id="topic_dot_uhk_me">
<h3 class="title topictitle3" id="ariaid-title8">Deleting variants</h3>
<div class="body">
<p class="p">
Any of the non-default variants in a dynamic content item can
be
deleted at any time. References to the dynamic content
placeholder do not affect the variants. To delete the
default variant, you need to make another variant the
default or delete the entire dynamic content item.
</p>
<div class="p">
<strong class="ph b">To delete a dynamic content variant</strong>
<ol class="ol" id="topic_dot_uhk_me__ol_ltg_jik_me">
<li class="li">
<span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_dot_uhk_me__d8e1147" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_workspaces_icon.png">
<strong class="ph b">Workspaces</strong> in the sidebar, then select <strong class="ph b">Agent tools &gt; Dynamic content</strong>.</span>
</li>
<li class="li">
Locate the item that contains the variant you
want to delete and open it.
</li>
<li class="li">
Locate the variant and click <strong class="ph b">Delete</strong>.
</li>
<li class="li">
Click <strong class="ph b">OK</strong> to confirm that
you want to
delete the item.
</li>
</ol>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested1" id="topic_hdn_hdi_je">
<h2 class="title topictitle2" id="ariaid-title9">Managing the translation of your dynamic content</h2>
<div class="body">
<p class="p">
You can manage the translation of your dynamic content in the following
ways:
</p>
<div class="p">
<ul class="ul" id="topic_hdn_hdi_je__ul_pjk_wtc_me">
<li class="li">
You can add translated content when you create the variants
in your Zendesk. You can
then manage updates to the translated content by editing
the variants.
</li>
<li class="li">
You can create all the default language versions of the dynamic
content and then
export them as CSV (comma separated values) files and send
them out for translation.
When the translations are complete you import the CSV files
back into your Zendesk and
all the language variants are added.
</li>
<li class="li">
You can do a combination of both these approaches; translating
and editing some
variants in-house and using the export/import process to
create and update the language
variants via a third-party translation agency.
</li>
</ul>
</div>
<p class="p">
For information about exporting and importing your dynamic content,
see
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408894053530">Exporting and importing dynamic content</a>.
</p>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested1" id="topic_enk_bdi_je">
<h2 class="title topictitle2" id="ariaid-title10">Using your dynamic content</h2>
<div class="body">
<p class="p">
The dynamic part of dynamic content is that the correct version of
the content is automatically
shown to the end user based on their language. The content is also
shown to agents in the same language as the end user. As
with the Zendesk placeholders (see
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408886858138" target="_blank">Zendesk data object
(placeholders) reference</a>),
to use your dynamic
content you simply reference the placeholder.
</p>
<p class="p">
Using the 'Password Help' dynamic content as an example, you can
use the dynamic content by
adding the placeholder into a comment in a business rule, such as
a
macro.
</p>
<p class="p">
Every dynamic content item has a corresponding placeholder.
</p>
<p class="p">
<img class="image img-screenshot" id="topic_enk_bdi_je__image_gxb_hmg_ne" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_placeholder.png" width="400">
</p>
<p class="p">In this example, it's {{dc.password_help}}. </p>
<p class="p">
<img class="image img-screenshot" height="NaN" id="topic_enk_bdi_je__image_jxs_iqd_me" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_macro_password.png" width="NaN">
</p>
<p class="p">
When the macro is applied to the ticket, the appropriate language
variant text is inserted into
the comment. If the end user's language is not one of your supported
languages, the default variant is used.
</p>
<p class="p">
Dynamic content placeholders can be used in your automations, macros,
and triggers. You can also
use your dynamic content for common system messages such as those
used in the sign up process. For example, the text contained in the
user welcome email message can be replaced with a dynamic content
placeholder.
</p>
<div class="p">
<img class="image img-screenshot" height="NaN" id="topic_enk_bdi_je__image_odr_ord_me" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/dc_user_welcome.png" width="NaN">
<div class="note note">
<span class="notetitle">Note:</span> For HTML formatting to
render correctly, you must add Liquid markup to your dynamic
content. See
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408842967578" target="_blank">Using Liquid markup to support multiple
languages</a>.
</div>
</div>
<p class="p">You can use dynamic content placeholders in the following:</p>
<div class="p">
<ul class="ul">
<li class="li">
Ticket field names, both system and custom (see
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408883892762" target="_blank">Using dynamic
content to translate your ticket
fields</a>)
</li>
<li class="li">Custom drop-down labels</li>
<li class="li">Custom ticket statuses</li>
<li class="li">Ticket form names</li>
<li class="li">
Agent signature (see
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408822471322" target="_blank">Adding an agent signature to
ticket email notifications)</a>
</li>
<li class="li">
Help center (see
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408834328090#topic_wnw_fbg_yj" target="_blank">Adding translated
text</a>)
</li>
<li class="li">
Sign-up messages for end users (visible only when Guide
is enabled), including:
<ul class="ul" id="topic_enk_bdi_je__ul_yjm_fso_ne">
<li class="li">User registration message</li>
<li class="li">User welcome email</li>
<li class="li">Email verification email</li>
</ul>
</li>
<li class="li">Macros</li>
<li class="li">
Triggers and automations
<div class="note note">
<span class="notetitle">Note:</span> When dynamic content
is
used in the body of a
<strong class="ph b">Notify URL target</strong>
action, the default variant is always
used.
</div>
</li>
<li class="li">Custom unified agent statuses</li>
<li class="li">
Other dynamic content
<div class="note note">
<span class="notetitle">Note:</span> Placeholders of
all types
that are used in dynamic content are limited to a
maximum of five levels of recursion.
</div>
</li>
</ul>
</div>
<p class="p">
How an end user's language is set and detected and then used when
displaying dynamic content is
explained in
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408888770714#topic_tmu_gno_ze" target="_blank">Setting and detecting a user's
language</a>.
You can also find several examples of how
to build a workflow based on language in
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408888770714#topic_uqw_ufw_bf" target="_blank">Using a requester's language in your
business rules</a>.
</p>
</div>
</div>
<script id="fast-path-script">
//<![CDATA[
const fast_path_style = document.createElement('style');
fast_path_style.innerHTML = `#article-body .fastpath{font-size:.9em;background-color:#f3f3f3;border:1px solid #d3d3d3;padding:10px 10px 8px;margin-bottom:16px}#article-body .fastpath::before{content:none!important}`;
document.head.appendChild(fast_path_style);
//]]>
</script>
<script id="ai-summary-script">
//<![CDATA[
const ai_summary_style = document.createElement('style');
ai_summary_style.innerHTML = `#styled-article-body{padding:0 0 0}#article-body #docs-ai-summary{background-color:#f3f3f3;border:1px solid #d3d3d3;padding:10px 10px 6px;margin-bottom:16px}#article-body #docs-ai-summary #docs-ai-summary-toggle{font-size:.9em;font-weight:700;margin-bottom:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}#article-body #docs-ai-summary #docs-ai-summary-toggle #up-triangle{margin-left:auto;padding-right:10px;display:none}#article-body #docs-ai-summary #docs-ai-summary-toggle #down-triangle{margin-left:auto;padding-right:10px}#article-body #docs-ai-summary #docs-ai-summary-content{font-size:.9em;padding-left:25px;padding-right:25px;margin-bottom:12px}`;
document.head.appendChild(ai_summary_style);

const toggleAISummary = () => {
const summary = document.getElementById("docs-ai-summary-content");
const upTriangle = document.getElementById("up-triangle");
const downTriangle = document.getElementById("down-triangle");
if (summary.style.display === "none") {
summary.style.display = "block";
upTriangle.style.display = "none";
downTriangle.style.display = "inline";
} else {
summary.style.display = "none";
upTriangle.style.display = "inline";
downTriangle.style.display = "none";
}
};

document.getElementById("docs-ai-summary-toggle").addEventListener("click", toggleAISummary);
//]]>
</script>