Add multilingual support to CCC
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3559384. -->
Reported by: [kristen pol](https://www.drupal.org/user/8389)
Related to !58
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
<strong>Additional Collaborators: </strong> @tonypaulbarker, @kristen pol<br>
<em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>We need to support context coming from different languages, and also need to support context translation.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Update the context entity and UI to support non-English and multilingual sites.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Evaluate code and make a plan</li>
<li>Update the code</li>
<li>Review, test, and commit</li>
</ul>
<h3 id="testing-steps">Testing steps</h3>
<ol>
<li>Install D11</li>
<li>Install language, content_translation, ai_agents, ai_logging, ai_agent_explorer modules</li>
<li>Set up your default provider and model</li>
<li>Install ai_context (dev) modules (see project page for steps)</li>
<li>Go to: /admin/config/regional/language</li>
<li>Add Spanish language</li>
<li>Go to: /admin/ai/context/items/add</li>
<li>Add English context item</li>
<li>Go to: /admin/ai/context/items</li>
<li>Choose "Translate" under the operations list for the English context item</li>
<li>For Spanish, add a translation and update the content in some way you will know it's the translation (e.g. add "Spanish" to the content)</li>
<li>Go to: /admin/ai/context/settings/agents/taxonomy_agent_config/edit</li>
<li>Choose "Always include" for the context item and save configuration</li>
<li>Go to: /admin/config/ai/agents/explore?agent_id=taxonomy_agent_config</li>
<li>Add prompt: "List all vocabularies" and run agent</li>
<li>When it's done, go to: /admin/config/ai/logging/collection</li>
<li>View the relevant log (should be the first one)</li>
<li>Search for "Site Context (selected)" and see what context was included (should be English)</li>
<li>Go to: /es/admin/config/ai/agents/explore?agent_id=taxonomy_agent_config (note the "es/")</li>
<li>Add prompt: "List all vocabularies on site" and run agent</li>
<li>When it's done, go to: /admin/config/ai/logging/collection</li>
<li>View the relevant log (should be the first one)</li>
<li>Search for "Site Context (selected)" and see what context was included (should be Spanish)</li>
</ol>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>The user will be able to add non-English context and be able to translate context between languages.</p>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
<h3>AI usage (if applicable)</h3>
<p>[ ] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p>
<p>[x] AI Generated Code<br>
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p>
<p>[ ] Vibe Coded<br>
This code was generated by an AI and has only been functionally tested.</p>
> Related issue: [Issue #3567798](https://www.drupal.org/node/3567798)
issue