Fast Mode
Use a faster, more cost-effective LLM model with the--fast flag:
When to Use Fast Mode
Development
Quick translations during development and testing
Large Projects
Translating many files to reduce costs and time
Draft Translations
Creating initial drafts for human review
Simple Content
Translating straightforward, non-critical text
Fast Mode Trade-offs
Advantages:- Faster translation speed
- Lower API costs
- Good for bulk operations
- Less contextual accuracy
- May miss nuanced meanings
- Not ideal for marketing or legal content
Combining Fast Mode with Interactive Mode
- Generate quick initial translations
- Review and refine results interactively
- Iterate rapidly during development
Skip Options
Skip Specific Files
Exclude certain language files from translation with--skip-names:
- Skip files you’ve already manually translated
- Exclude files with highly technical or specialized terminology
- Avoid files that are managed by another team or process
Skip Specific Languages
Exclude certain target languages with--skip-languages:
- Skip languages handled by professional translators
- Exclude languages pending review
- Avoid languages with special requirements
The skip options are applied after the
--name and --language options, giving you fine-grained control over what gets translated.Custom Language Directory
Specify a custom location for your translation files with--lang-dir:
When to Use Custom Language Directory
Package Development:Default Behavior
Without the--lang-dir option, the package uses Laravel’s standard lang_path(), which defaults to:
- Laravel 9+:
lang/directory in project root - Laravel 8 and below:
resources/lang/
Advanced Flag Combinations
Selective Translation Workflow
Translate specific files while skipping others:- To French, Spanish, and German
- All files except auth and passwords
- Using fast mode for speed
Package-Specific Translation
Translate a package’s language files:Production-Ready Workflow
Translate critical files with quality control:- Focuses on critical domains
- Skips Chinese (handled externally)
- Uses interactive mode for quality control
Development Workflow
Quick translations for development:Undocumented Internal Options
The package includes some internal options that are generally not needed:—after
Command Reference
All Available Options
Here’s the complete list of options for thetranslate command:
| Option | Type | Description |
|---|---|---|
--name | string | Translate specific files (comma-separated) |
--language | string | Translate to specific languages (comma-separated) |
--base-language | string | Source language (defaults to app.locale) |
--fast | flag | Use faster, less precise LLM |
--interactive | flag | Enable interactive re-translation prompts |
--skip-names | string | Skip specific files (comma-separated) |
--skip-languages | string | Skip specific languages (comma-separated) |
--lang-dir | string | Custom translation directory path |
Validation Command Options
| Option | Type | Description |
|---|---|---|
--name | string | Validate specific files (comma-separated) |
--language | string | Validate specific languages (comma-separated) |
--base-language | string | Source language for validation |
--lang-dir | string | Custom translation directory path |
--verbose / -v | flag | Show detailed output with missing key tables |
Best Practices
Performance Tips
Parallel Processing
The package processes translations sequentially, so:- Translate different language sets in separate terminal sessions
- Use
--languageto split work across multiple commands - Consider background jobs for large translation tasks
Cost Optimization
Time Optimization
Next Steps
Basic Translation
Return to basic translation guide
Configuration
Configure LLM providers and settings