{"id":29282231,"url":"https://github.com/javidalpe/laravel-localization-automation","last_synced_at":"2026-04-13T21:31:58.270Z","repository":{"id":56997028,"uuid":"109255036","full_name":"javidalpe/laravel-localization-automation","owner":"javidalpe","description":"Use this library to translate your Laravel localization files","archived":false,"fork":false,"pushed_at":"2017-11-07T14:58:25.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T17:31:44.826Z","etag":null,"topics":["artisan-command","deepl","laravel","localization","translation"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javidalpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-02T11:18:08.000Z","updated_at":"2022-10-21T15:35:04.000Z","dependencies_parsed_at":"2022-08-21T14:50:10.930Z","dependency_job_id":null,"html_url":"https://github.com/javidalpe/laravel-localization-automation","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/javidalpe/laravel-localization-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-localization-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-localization-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-localization-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-localization-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javidalpe","download_url":"https://codeload.github.com/javidalpe/laravel-localization-automation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javidalpe%2Flaravel-localization-automation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan-command","deepl","laravel","localization","translation"],"created_at":"2025-07-05T17:18:29.892Z","updated_at":"2026-04-13T21:31:58.260Z","avatar_url":"https://github.com/javidalpe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automatically translate your lang files\nThis package translates your Laravel localization files automatically using a third party service. Currently only supports [DeepL](https://www.deepl.com).\n\n\u003e This package only works with 'Short Keys' approach\n\n## Installation\nYou can install the package via composer:\n```\ncomposer require --dev javidalpe/laravel-localization-automation\n```  \n\nIf you're on Laravel 5.4 or earlier, you'll need to add the following to your config/app.php:\n```php\n'providers' =\u003e [\n    ...\n    Javidalpe\\LaravelLocalizationAutomation\\LaravelLocalizationAutomationServiceProvider::class,\n];\n```\n\n## Usage \nThis command translates all your files in `/lang/{from}/` directory and create the new ones in `/lang/{to}/` directory. \n```\nphp artisan localization:translate {from} {to} {--provider=deepl}\n```\n\n**Example using default provider:**\n```\nphp artisan localization:translate es fr\n```\n\n**Example using custom provider:**\n```\nphp artisan localization:translate es fr --provider=deepl\n```\n\n### Known issues\nThe command will fail on:\n1. Lemmas with HTML inside.\n    ```php\n    \\\\Wrong\n    'welcome.greetings' =\u003e '\u003cstrong\u003eHey!\u003c/strong\u003e',\n    \\\\Good\n    'welcome.greetings' =\u003e 'Hey!',\n    ```\n2. Lemmas with placeholders different from Laravel. \n    ```php\n    \\\\Wrong\n    'welcome.greetings' =\u003e 'Hey {{name}}!',\n    \\\\Good\n    'welcome.greetings' =\u003e 'Hey!',\n 3. URLs. Fix these URLs manually.\n## Supported Languages\n### Deeply\nDeepL(y) supports these languages:\n\n| Code | Language      |\n|------|---------------|\n| DE   | German        |\n| EN   | English       |\n| FR   | French        |\n| ES   | Spanish       |\n| IT   | Italian       |\n| NL   | Dutch         |\n| PL   | Polish        |\n\n\nDeepL says they will [add more languages](https://www.heise.de/newsticker/meldung/Maschinelles-Uebersetzen-Deutsches-Start-up-DeepL-will-230-Sprachkombinationen-unterstuetzen-3836533.html) \nin the future, such as Chinese and Russian.\n\n## How it works\n1. Foreach file in `/lang/{from}/` directory.\n2. Foreach lemma in file.\n3. Split pluralization lemmas.\n4. Replace each Laravel place-holder with temp string.\n5. Translate the lemma using the provider.\n6. Undo replacement.\n7. Assembly all lemmas in new files at `/lang/{to}/` directory.\n\n## Contributing\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-translation-service)\n3. Commit your changes (git commit -am 'Added translation service')\n4. Push to the branch (git push origin my-new-translation-service)\n5. Create new Pull Request\n\n### Add a new translation service\n1. Create a new class inside `/src/TranslationServices`. Implements `TranslationServiceStrategy`.\n2. Add this class to `TranslationServiceStrategyFactory`.\n3. Update this `README.md file.\n\n## Credits\n- DeepL GmbH: https://www.deepl.com/\n- Chris Konnertz: https://github.com/chriskonnertz/DeepLy\n\n## License\nThe MIT License (MIT). Please see License File for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavidalpe%2Flaravel-localization-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavidalpe%2Flaravel-localization-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavidalpe%2Flaravel-localization-automation/lists"}