Skip to content

v2.7 - Context-Aware AI Translations

Choose a tag to compare

@jayeshmepani jayeshmepani released this 09 Jul 08:21
· 12 commits to main since this release

✨ New Feature: Context-Aware Translations with --context

You can now use the optional --context flag to provide a short description of your project directly to the AI. This is crucial for applications in domains like finance, healthcare, legal, or any field with specialized vocabulary.

How it works:
The command injects your description into the AI prompt, helping it understand the specific meaning of ambiguous words.

Example: Financial Application
Without context, the AI might translate "position" as a physical location. With context, it understands it as a financial holding.

# NEW: Provide context for a financial trading platform
php artisan translations:extract-and-generate --context="A SaaS platform for financial trading of stocks. Terms like 'position' and 'security' refer to financial concepts."

This update makes the translator significantly more robust and intelligent, ensuring higher-quality translations and a smoother developer experience.