{"id":36971444,"url":"https://github.com/elsayed85/laravel-translation","last_synced_at":"2026-01-13T21:53:45.697Z","repository":{"id":57727654,"uuid":"517749552","full_name":"elsayed85/laravel-translation","owner":"elsayed85","description":"Translation management for your Laravel application.","archived":false,"fork":true,"pushed_at":"2022-07-25T20:34:46.000Z","size":2177,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-06T03:04:59.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"joedixon/laravel-translation","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsayed85.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-25T16:56:51.000Z","updated_at":"2022-07-25T17:01:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/elsayed85/laravel-translation","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/elsayed85/laravel-translation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Flaravel-translation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Flaravel-translation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Flaravel-translation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Flaravel-translation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsayed85","download_url":"https://codeload.github.com/elsayed85/laravel-translation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Flaravel-translation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":[],"created_at":"2026-01-13T21:53:44.812Z","updated_at":"2026-01-13T21:53:45.692Z","avatar_url":"https://github.com/elsayed85.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n![Laravel Translation](logo.png)\n  \nTranslation management for your Laravel application.\n\n![Laravel Translation UI](translation.png)\n\n![GitHub](https://img.shields.io/github/checks-status/Elsayed85/laravel-translation/master?style=for-the-badge)\n![GitHub](https://img.shields.io/github/license/Elsayed85/laravel-translation.svg?style=for-the-badge)\n\n\u003c/div\u003e\n\n------\n\n## About Laravel Translation\n\nLaravel Translation is a package for Laravel 5 which allows you full control\nover your translations when using [Laravel's\nlocalization](https://laravel.com/docs/5.7/localization) functionality.\n\nThe package allows you to manage your translations using either the native file\nbased translations, but also provides a database driver which is useful in\nmulti-server setups.\n\nIt exposes a user interface allowing you to update existing and add new\ntranslations to your application.\n\nBelow are a full list of features:\n\n- File and database drivers\n- Database translation loader (automatically load translations from the database\n  when Laravel's translation retrieval methods and the database driver)\n- User interface to add new languages and add and update translations\n- Artisan commands to manage your translations\n- Scan your application for missing translations\n\n## Version Compatibility\n\n|    Laravel    | Laravel Translation |\n| ------------- | ------------------- |\n|      6.x      |          1.x        |\n|      7.x      |          1.x        |\n|      8.x      |          2.x        |\n\n## Installation\n\nInstall the package via Composer\n\n`composer require Elsayed85/laravel-translation`\n\nPublish configuration and assets\n\n`php artisan vendor:publish --provider=\"Elsayed85\\Translation\\TranslationServiceProvider\"`\n\nThe service provider is loaded automatically using [package discovery](https://laravel.com/docs/5.7/packages#package-discovery).\n\n## Usage\n\n### Configuration\n\nThe package ships with a configuration file called `translation.php` which is published to the\nconfig directory during installation. Below is an outline of the settings.\n\n```\ndriver [file|database]\n```\nChoose either `file` or `database`. File translations utilise Laravel's native\nfile based translations and includes support for both `array` based and `json` based\nlanguage files.\n\n```\nroute_group_config.middleware [string|array]\n```\nApply middleware to the routes which ship with the package. For example, you may\nwhich to use the `auth` middleware to ensure package user interface is only\naccessible to logged in users.\n\n```\ntranslation_methods [array]\n```\nChoose which of Laravel's translation methods to use when searching for missing\ntranslation keys.\n\n```\nscan_paths [array]\n```\nChoose which paths to use when searching for missing translations. Narrowing the\nsearch to specific directories will result in a performance increase when\nscanning for missing translations. \n\n```\nui_url [string]\n```\nChoose the root URL where the package user interface can be accessed. All routes\nwill be prefixed by this value.\n\ne.g. setting this value to `languages` will result in URLs such as `translations/{language}/translations`\n\n```\ndatabase.languages_table\n```\nChoose the name of the languages table when using the database driver.\n\n```\ndatabase.translations_table\n```\nChoose the name of the translations table when using the database driver.\n\n### Drivers\n\n#### File\nUtitlises Laravel's native php array and JSON based language files and exposes a\nuser interface to manage the enclosed translations. Add and update languages and translations\nusing either the user interface or the built-in [Artisan commands](https://laravel.com/docs/5.7/artisan).\n\n#### Database\nThe database driver takes all of the functionality of Laravel's file based\nlanguage files, but moves the storage to the database, utilising the connection\nconfigured for your Laravel application.\n\nIt also replaces the translation loader in the container so all of Laravel's\ntranslation retrieval methods (`__()`, `trans()`, `@lang()`, etc) will load the\nrelevant strings from the database rather than the files without the need to\nchange any code in your application. It's a like for like swap.\n\nTo utilise the database driver, make sure to update the database table names in\nthe configuration file and run the migrations.\n\n### User interface\nNavigate to http://your-project.test/languages (update `languages` to match the\n`translation.ui_url` configuration setting) and use the interface to manage\nyour translations.\n\nFirst, click on the language you wish to edit. On the subsequent page, find the\ntranslation you want to edit and click on the pencil icon or on the text and\nmake your edits. As soon as you remove focus from the input, your translation\nwill be saved, indicated by the green check icon.\n\n### Artisan Commands\nThe package ships with a series of Artisan commands which assist with\ntranslation management.\n\n```\ntranslation:add-language\n```                  \nAdd a new language to the application.\n  \n```\ntranslation:add-translation-key\n```            \nAdd a new language key for the application.\n  \n```\ntranslation:list-languages\n```\nList all of the available languages in the application.\n  \n```\ntranslation:list-missing-translation-keys\n```\nList all of the translation keys in the app which don't have a corresponding translation.\n  \n```\ntranslation:sync-translations\n```             \nSynchronise translations between drivers. This is useful if you have an exisitng\napplication using the native file based language files and wish to move to the\ndatabase driver. Running this command will take all of the translations from the\nlanguage files and insert them in to the database.\n\n```\ntranslation:sync-missing-translation-keys\n```\nThis command will scan your project (using the paths supplied in the\nconfiguration file) and create all of the missing translation keys. This can be\nrun for all languages or a single language.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Flaravel-translation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsayed85%2Flaravel-translation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Flaravel-translation/lists"}