{"id":25564577,"url":"https://github.com/3ynm/laravel-transtojson","last_synced_at":"2026-05-01T18:31:55.367Z","repository":{"id":62514026,"uuid":"110904201","full_name":"3ynm/laravel-transtojson","owner":"3ynm","description":"Turn Laravel 5 dot.based.translations into JSON-based translations","archived":false,"fork":false,"pushed_at":"2017-11-24T20:00:15.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T08:04:21.134Z","etag":null,"topics":["laravel","laravel-localization"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3ynm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-16T00:50:50.000Z","updated_at":"2017-11-16T01:44:51.000Z","dependencies_parsed_at":"2022-11-02T13:02:43.312Z","dependency_job_id":null,"html_url":"https://github.com/3ynm/laravel-transtojson","commit_stats":null,"previous_names":["3ynm/laravel-transtojson","hacktivista/laravel-transtojson"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/3ynm/laravel-transtojson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ynm%2Flaravel-transtojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ynm%2Flaravel-transtojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ynm%2Flaravel-transtojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ynm%2Flaravel-transtojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3ynm","download_url":"https://codeload.github.com/3ynm/laravel-transtojson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3ynm%2Flaravel-transtojson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32508900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["laravel","laravel-localization"],"created_at":"2025-02-20T21:20:10.925Z","updated_at":"2026-05-01T18:31:55.338Z","avatar_url":"https://github.com/3ynm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel translations to JSON\n\nTurn Laravel 5 dot.based.translations into JSON-based translations\n\n## Installation\n\n```\ncomposer require hacktivista/laravel-transtojson --dev\n```\n\n## Usage\n\n```\nphp artisan translations:to_json path/to/process/ src_lang [dest_lang] [--debug]\n```\n\nE.g.\n```\nphp artisan translations:to_json resources/views/ en es\n```\n\nIt will:\n- Replace all `trans('...')` and `__('...')` translations found in files on `path/to/process/` and subfolders with `__(\"Textual translation strings\")`\n- Create a JSON file in `resources/lang/` with textual translation strings *\n\n\\* If JSON file already exists it will merge results with what's already on it. If there's a match with a phrase already matched, contents on the JSON file will prevail.\n\n**THIS WILL OVERWRITE ALL FILES USING __() AND trans() FUNCTIONS IN `path/to/process/` AND SUBDIRECTORIES. BE SURE TO BACKUP FILES PREVIOUS TO RUN THIS COMMAND!**\n\nIn order to check results without writing to files run with `--debug` option.\n\n`dest_lang` is optional, if set, the resulting JSON file will have source language strings associated with destination language strings. If not, only source language strings with empty destination strings.\n\nIt will NOT delete translations in `resources/lang/\u003clang\u003e/`, do it manually when you consider appropriate.\n\n## Contributing\n\nIf you'd like to contribute to this project please read [CONTRIBUTING.md](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ynm%2Flaravel-transtojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3ynm%2Flaravel-transtojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3ynm%2Flaravel-transtojson/lists"}