Multilingual Troubleshooting
Context not translating
- Verify content translation is enabled for
ai_context_item at
/admin/config/regional/content-language
- Check that the context item has a translation in the target language
- Verify the language is properly configured in Drupal at
/admin/config/regional/language
- Clear all caches (
drush cr)
Wrong language returned
- Enable debug logging and check the
ai_context log
messages for the detected language
- Verify the AJAX caller is sending a Referer header (browsers do this by
default)
- Verify that
language.negotiation config has the correct url.prefixes
mapping
- If the language prefix is missing from both the request path and Referer,
the system falls back to
getCurrentLanguage(TYPE_CONTENT)
Translation not saving
- Verify the user has permission to translate content
- Check that all required fields are filled in the translation
- Verify the translation is marked as published
- Clear all caches after saving