-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Description
What would you like to be added?
Add comprehensive internationalization (i18n) support to Gemini CLI to make it accessible to non-English speaking developers worldwide.
Proposed Implementation:
- Integrate
react-i18nextfor translation management - Support language detection via
GEMINI_LANGenvironment variable - Create translation framework for core UI components:
- Help system (
/helpcommand output) - Error messages and dialogs
- Shell confirmation prompts
- Status indicators and feedback
- Help system (
- Maintain full backward compatibility (English as default)
- Enable community-contributed translations
Technical Approach:
- Minimal performance impact through lazy loading of translation resources
- Type-safe translation keys using TypeScript
- Fallback mechanism to English for missing translations
- Integration with existing React + Ink architecture
Proposed Languages (Initial):
- English (default, no changes needed)
- Chinese (Simplified) - Large developer community
- Spanish - Second most spoken language globally
- French - Strong developer community in Europe/Africa
Example Implementation:
// Before
<Text>Basics:</Text>
// After
<Text>{t('help.basics')}</Text>Why is this needed?
-
Global Accessibility: Gemini CLI is used by developers worldwide, but currently all UI text is hardcoded in English, creating barriers for non-English speakers.
-
Large International User Base: Search of existing issues reveals numerous IME-related problems for CJK languages (The UI is strange when using Japanese input. #4481, Poor real-time display of Korean IME composition in Gemini CLI #3014, Bug: Chinese IME composition is not handled correctly in the CLI #5833, Korean (Hangul) input drops the last character in Gemini CLI #2797, Chinese input BUG on MacOS #2618, etc.), indicating significant international usage. These users would greatly benefit from localized UI text.
-
Inclusive Design: Aligns with Google's commitment to inclusive design and global accessibility standards.
-
Community Growth: Enables broader community adoption and contribution from international developers.
-
Industry Standard: Modern CLI tools (like
git,docker,npm) increasingly support internationalization. -
Complementary to Existing Work: This proposal would complement the ongoing IME fixes by providing localized interface text for the same international users experiencing input issues.
Additional context
Research Findings:
- Analyzed the current codebase and identified ~197 user-facing text strings that would benefit from internationalization
- Searched existing issues - no duplicate requests found for UI language localization
- Current hardcoded text examples: "Basics:", "Shell mode", "Add context", error messages, confirmation dialogs
Technical Feasibility:
- Implementation can be done incrementally without breaking existing functionality
- React + Ink architecture already supports i18n libraries
- Estimated implementation: 2-3 weeks for core framework + initial languages
Impact Assessment:
- Zero breaking changes to existing functionality
- Opt-in feature (English remains default)
- Enables community contribution of additional languages
- Improves accessibility for international developers
Implementation Plan:
- Set up i18n infrastructure with react-i18next
- Extract hardcoded strings to translation keys
- Implement language detection via environment variables
- Add initial language packs (Chinese, Spanish, French)
- Create contribution guidelines for community translations
I have signed the Google CLA and am prepared to implement this feature following the project's contribution guidelines.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status