feat: Add multi-language support for CrewAI prompts (Fixes #3780) #3781
+317
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Add multi-language support for CrewAI prompts (Fixes #3780)
Summary
This PR adds multi-language support to CrewAI, allowing users to specify a language for agent and crew prompts. Previously, all prompts were hardcoded in English. Now users can:
languageparameter onAgentorCrewto use translations in their preferred languagees.json) is included as an exampleKey Changes:
I18Nclass withlanguageparameter and fallback logiclanguagefield toBaseAgentandCrewclassesReview & Testing Checklist for Human
es.jsonfor translation quality. The translations were AI-generated and should be validated by a native Spanish speaker for accuracy, natural phrasing, and appropriate technical terminologyuv run pytest lib/crewai/tests/utilities/test_i18n_multilanguage.py lib/crewai/tests/test_agent_language.py -vvto verify all tests pass in a clean environmentkickoff()language="fr") to confirm it falls back to English gracefullylanguage="es"and verify that:Test Plan
Notes
prompt_filecan override language-based translationsSession Info: