Travel Translator
A powerful, AI-enhanced translation app built with React Native and Expo, designed specifically for travelers who need reliable communication tools anywhere in the world.
π Features
Core Translation
- Real-time Text Translation: Powered by OpenAI's GPT-4 for accurate, context-aware translations
- 29+ Languages Supported: Comprehensive language coverage for global travel
- Smart Language Detection: Automatic detection of source language
- Bidirectional Translation: Easy language swapping with one tap
AI Voice Technology
- Premium AI Voices: Integration with ElevenLabs for natural, human-like speech
- Multiple Voice Options: Different voice personalities for each language
- High-Quality Audio: Crystal-clear pronunciation and natural intonation
- Offline Fallback: System text-to-speech when AI voices aren't available
User Experience
- Translation History: Automatic saving of all translations for easy reference
- Offline Mode: Core functionality works without internet connection
- Beautiful UI: Apple-level design aesthetics with smooth animations
- Voice Recording: Speak naturally and get instant translations (coming soon)
Customization
- Default Languages: Set your preferred source and target languages
- Auto-Speak: Automatic pronunciation of translations
- Dark Mode: Eye-friendly interface (coming soon)
- Audio Cache: Smart caching for faster voice playback
π Getting Started
Prerequisites
- Node.js 18+ installed
- Expo CLI installed globally:
npm install -g @expo/cli - iOS Simulator (for Mac) or Android Studio (for Android development)
Installation
Clone the repository
git clone <repository-url> cd travel-translatorInstall dependencies
npm installSet up environment variables
cp .env.example .envAdd your API keys to
.envEXPO_PUBLIC_OPENAI_API_KEY=your_openai_api_key_here EXPO_PUBLIC_ELEVENLABS_API_KEY=your_elevenlabs_api_key_hereStart the development server
npm run dev
π§ Configuration
OpenAI Setup (Required for Real Translations)
Get an OpenAI API Key
- Visit OpenAI API
- Create an account or sign in
- Generate a new API key
- Add billing information (pay-per-use pricing)
Add to Environment
EXPO_PUBLIC_OPENAI_API_KEY=sk-your-key-here
ElevenLabs Setup (Optional - For Premium AI Voices)
Get an ElevenLabs API Key
- Visit ElevenLabs
- Create an account
- Go to Profile Settings β API Keys
- Generate a new API key
Add to Environment
EXPO_PUBLIC_ELEVENLABS_API_KEY=your-elevenlabs-key-here
π± Usage Guide
Basic Translation
Select Languages
- Tap the "From" dropdown to select source language
- Tap the "To" dropdown to select target language
- Use the swap button (π) to quickly reverse languages
Enter Text
- Type or paste text in the input field
- Tap "Translate" to get instant translation
- Translation appears in the blue highlighted area
Listen to Translation
- With ElevenLabs: Tap the AI voice button for premium audio
- Without ElevenLabs: Tap the speaker icon for system voice
Voice Translation (Coming Soon)
Prepare for Recording
- Ensure microphone permissions are granted
- Select your source language
Record Speech
- Hold the microphone button
- Speak clearly in your selected language
- Release when finished
Get Results
- Speech is automatically transcribed
- Translation appears instantly
- Audio playback available immediately
Managing History
View Past Translations
- Navigate to the "History" tab
- Scroll through chronological list
- Tap any translation to hear it again
Clear History
- Tap "Clear All" in the history tab
- Confirm deletion in the popup
- All translations are permanently removed
Settings & Customization
Default Languages
- Go to Settings tab
- Set preferred source language
- Set preferred target language
- These become defaults for new sessions
Audio Settings
- Toggle auto-speak on/off
- Configure ElevenLabs integration
- Clear audio cache if needed
ElevenLabs Integration
- Add API key in settings
- Enjoy premium AI voices
- Multiple voice options per language
π Supported Languages
The app supports 20+ languages including:
- European: English, Spanish, French, German, Italian, Portuguese, Russian, Polish, Dutch, Swedish, Danish, Norwegian
- Asian: Japanese, Korean, Chinese (Mandarin), Hindi, Thai, Vietnamese, Turkish
- Middle Eastern: Arabic
Each language includes:
- Text translation capabilities
- Text-to-speech support
- ElevenLabs AI voice integration (where available)
ποΈ Technical Architecture
Frontend Framework
- React Native: Cross-platform mobile development
- Expo Router: File-based navigation system
- TypeScript: Type-safe development
- React Native Reanimated: Smooth animations
Backend Services
- OpenAI GPT-4: Advanced language translation
- ElevenLabs: Premium AI voice synthesis
- AsyncStorage: Local data persistence
Key Components
app/
βββ (tabs)/
β βββ index.tsx # Main translation interface
β βββ history.tsx # Translation history
β βββ settings.tsx # App configuration
βββ components/
β βββ AudioPlayer.tsx # AI voice playback
β βββ LanguageSelector.tsx # Language picker
β βββ RecordingButton.tsx # Voice input (future)
β βββ TranslationCard.tsx # History item display
βββ services/
βββ translationService.ts # OpenAI integration
βββ elevenLabsService.ts # Voice synthesis
βββ storageService.ts # Local data management
π Privacy & Security
Data Handling
- Local Storage: All translations stored locally on device
- No Cloud Sync: Your data never leaves your device
- API Security: API keys stored securely in environment variables
- Minimal Data: Only text and timestamps stored
API Usage
- OpenAI: Text sent for translation only, not stored by OpenAI
- ElevenLabs: Text sent for voice synthesis, not stored permanently
- No Tracking: No analytics or user behavior tracking
π Deployment
Development Build
# iOS
expo run:ios
# Android
expo run:android
# Web
expo start --web
Production Build
# Build for app stores
expo build:ios
expo build:android
# Web deployment
expo export --platform web
Environment Configuration
Create environment-specific files:
.env.development- Development settings.env.staging- Staging environment.env.production- Production configuration
π οΈ Development
Project Structure
travel-translator/
βββ app/ # Expo Router pages
βββ components/ # Reusable UI components
βββ services/ # Business logic & API calls
βββ types/ # TypeScript definitions
βββ constants/ # App constants & configuration
βββ hooks/ # Custom React hooks
βββ assets/ # Images, fonts, etc.
Code Style
- TypeScript: Strict type checking enabled
- ESLint: Code linting and formatting
- Prettier: Consistent code formatting
- Component Structure: Functional components with hooks
Adding New Features
Create Feature Branch
git checkout -b feature/new-featureImplement Changes
- Add components in
/components - Add services in
/services - Update types in
/types
- Add components in
Test Thoroughly
- Test on iOS and Android
- Verify web compatibility
- Check offline functionality
π Troubleshooting
Common Issues
Translation Not Working
- Verify OpenAI API key is correct
- Check internet connection
- Ensure API key has sufficient credits
AI Voices Not Playing
- Verify ElevenLabs API key
- Check device audio settings
- Clear audio cache in settings
App Crashes on Startup
- Clear app data and restart
- Reinstall dependencies:
rm -rf node_modules && npm install - Check Expo CLI version:
expo --version
Debug Mode
Enable debug logging by adding to .env:
EXPO_PUBLIC_DEBUG=true
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
π Support
For support and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the documentation
π― Roadmap
Upcoming Features
- Voice Recording: Real-time speech-to-text translation
- Offline Translation: Basic translation without internet
- Photo Translation: OCR and translate text from images
- Conversation Mode: Back-and-forth translation interface
- Phrasebook: Common travel phrases by category
- Dark Mode: Complete dark theme implementation
Long-term Goals
- Multiple Voice Options: Choose from different AI voices
- Regional Dialects: Support for regional language variations
- Cultural Context: Cultural notes and etiquette tips
- Travel Integration: Integration with maps and travel apps
Made with β€οΈ for travelers worldwide
Powered by OpenAI GPT-4 and ElevenLabs AI voices
Built With
- bolt
- elevenlabs
- openai
- react

Log in or sign up for Devpost to join the conversation.