alisalehi/laravel-lang-files-translator

easiest way to translate lang files to another language in laravel

v1.0.01 2024-02-20 20:42 UTC

This package is auto-updated.

Last update: 2024-04-28 00:05:56 UTC


README

Laravel Lang Files Translator PHP Version Require Required Laravel Version Total Downloads License

Laravel lang files translator is a package for the Easiest way to translate lang files to other languages in PHP format in Laravel.

problems:

Did you buy a Laravel script and it doesn't have your language in thelangfile?
Do you want to make your web application bilingual, but you don't know how to translate all those words?
Do you not have the possibility to use the JSON format that many Laravel language translation packages give you?

Requirements

  • PHP: >=8.0
  • stichoza/google-translate-php: ^5.1
  • Laravel Framework: 9.*|10.*

Installation

composer require alisalehi/laravel-lang-files-translator

💎Usage

php artisan translate:lang {from} {to}

for example, your locale is English and you have en lang files and want to have these files to Persian(fa) lang too. just enough to run:

php artisan translate:lang en fa

and done! Go to lang/fa and you will see all the translated files from the en folder.

how to use video ⤵️

291937142-9fdb0342-a045-4a3d-8b76-51c848dce2ec.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQyNjMwNTYsIm5iZiI6MTcxNDI2Mjc1NiwicGF0aCI6Ii8xMTE3NjYyMDYvMjkxOTM3MTQyLTlmZGIwMzQyLWEwNDUtNGEzZC04Yjc2LTUxYzg0OGRjZTJlYy5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQyOFQwMDA1NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNThkOWVmY2UyMDY3ZmExNWRiODBhODBmYjIwMWFkMGJlODFlNDk2NzU0NTI1Y2JiOTFjZmFmYzBmNmUzYTlkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.hNRy3zJTFuv-p2q3ZqWsSjDrSIH8f-dHtIdnkOdFWnE

🙋‍♂️Contributing

laravel-lang-files-translator

As Einstein said, "There's a way to do it better!" So I welcome any change that makes the code better, more readable, and testable. (Even renaming a variable!)

Just open an issue or pull a request.

License

The MIT License (MIT). See License File for more information.

❤️Contributing

This project exists thanks to all the people who contribute. CONTRIBUTING