Skip to content

Multilingual Troubleshooting

Context not translating

  1. Verify content translation is enabled for ai_context_item at /admin/config/regional/content-language
  2. Check that the context item has a translation in the target language
  3. Verify the language is properly configured in Drupal at /admin/config/regional/language
  4. Clear all caches (drush cr)

Wrong language returned

  1. Enable debug logging and check the ai_context log messages for the detected language
  2. Verify the AJAX caller is sending a Referer header (browsers do this by default)
  3. Verify that language.negotiation config has the correct url.prefixes mapping
  4. If the language prefix is missing from both the request path and Referer, the system falls back to getCurrentLanguage(TYPE_CONTENT)

Translation not saving

  1. Verify the user has permission to translate content
  2. Check that all required fields are filled in the translation
  3. Verify the translation is marked as published
  4. Clear all caches after saving