Download the PHP package quarkinocom/laravel-translation-manager without Composer
On this page you can find all versions of the php package quarkinocom/laravel-translation-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quarkinocom/laravel-translation-manager
More information about quarkinocom/laravel-translation-manager
Files in quarkinocom/laravel-translation-manager
Package laravel-translation-manager
Short Description A Laravel Artisan command package to manage and automate language translations, leveraging OpenAI for high-quality translations.
License MIT
Informations about the package laravel-translation-manager
Laravel Translation Manager
The Laravel Translation Manager is an Artisan command suite designed for managing and automating the translation process in Laravel applications. Utilizing the OpenAI API, this package simplifies tasks such as displaying, comparing, translating, and repairing language files across different languages, making it a must-have for developers working on multilingual projects.
Installation
To get started, install the package through Composer:
This command automatically installs the package and registers its service provider via Laravel's package discovery.
Publishing Configuration
To customize the package's settings, such as specifying your OpenAI API key, publish the configuration file:
This command copies the translation-manager.php configuration file to your project's config directory.
Usage
The package introduces several Artisan commands to streamline language file management:
Show Command
Display a list of all translation files for a specified language, including the count of translation keys.
Usage:
Sample Command:
Expected Output:
Compare Command
Compare translation files between two languages, highlighting missing or empty keys.
Usage:
Sample Command:
Expected Output:
Translate Command
Translate missing or empty keys from the source language to the target language. Optionally, create or update translation files.
Usage:
-
To translate all keys:
- To repair (translate only missing or empty keys):
Sample Command:
Expected Result: This command will output the number of keys translated and API calls made, without a specific table format as the result is dependent on the translations performed.
Git Repository
Explore or contribute to Laravel Translation Manager on GitHub:
https://github.com/quarkinocom/laravel-translation-manager
Contributing
Contributions are welcome and greatly appreciated! Feel free to fork the repository, make your changes, and submit a pull request. For substantial changes, please open an issue first to discuss what you would like to change. Remember to update tests as needed.