
## Translation with AI (dart script: translate_script.dart)


### create .env file in root folder of flux_localization

```
# Configuration for AI Translation Script - ./scripts/translate_script.dart

# Main language (used as reference for keys)
MAIN_LANG=en

# AI Service to use for translation
# Options: openai, gemini, grok
AI_TRANSLATE=openai

# Folder containing language files
FOLDER=lib/src/l10n

# OpenAI Configuration
OPENAI_APIKEY=your-openai-api-key-here
OPENAI_BASE_URL=https://openai.api
OPENAI_MODEL=gpt-4.1

# Grok Configuration
GROK_APIKEY=your-grok-api-key-here
GROK_BASE_URL=https://api.x.ai/v1/chat/completions
GROK_MODEL=grok-beta

# Gemini Configuration
GEMINI_APIKEY=your-gemini-api-key-here
GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/models
GEMINI_MODEL=gemini-pro
```

### Run
- open terminal in flux_localization
```
dart ./scripts/translate_script.dart
```