{"id":37001671,"url":"https://github.com/shapehq/laravel-language-center","last_synced_at":"2026-01-14T00:23:28.611Z","repository":{"id":57028714,"uuid":"53943789","full_name":"shapehq/laravel-language-center","owner":"shapehq","description":"Language Center for Laravel.","archived":false,"fork":false,"pushed_at":"2022-10-06T08:38:15.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-22T21:28:38.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://novasa.com","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/shapehq.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":"2016-03-15T12:44:28.000Z","updated_at":"2023-10-23T07:55:57.000Z","dependencies_parsed_at":"2022-08-23T16:20:46.378Z","dependency_job_id":null,"html_url":"https://github.com/shapehq/laravel-language-center","commit_stats":null,"previous_names":["shapehq/laravel-language-center","novasa/laravel-language-center"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/shapehq/laravel-language-center","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapehq%2Flaravel-language-center","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapehq%2Flaravel-language-center/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapehq%2Flaravel-language-center/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapehq%2Flaravel-language-center/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shapehq","download_url":"https://codeload.github.com/shapehq/laravel-language-center/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shapehq%2Flaravel-language-center/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-14T00:23:27.964Z","updated_at":"2026-01-14T00:23:28.589Z","avatar_url":"https://github.com/shapehq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Language Center\nLanguage Center for Laravel.\n\n\u003e This requires access to Novasa's Language Center.\n\n# Install\n\nRun `composer require novasa/laravel-language-center:~2.0`.\n\nIn `config/app.php` replace `Illuminate\\Translation\\TranslationServiceProvider::class,` with `Novasa\\LaravelLanguageCenter\\TranslationServiceProvider::class,` in the `providers`-section.\n\nThen add the the following environments to your application:\n```\nLANGUAGE_CENTER_URL=The url for API v1 (with ending slash) (required)\nLANGUAGE_CENTER_USERNAME=Language Center username for Basic Auth (required)\nLANGUAGE_CENTER_PASSWORD=Language Center password for Basic Auth (required)\nLANGUAGE_CENTER_PLATFORM=The default platform to use. (default 'web')\nLANGUAGE_CENTER_UPDATE_AFTER=The amount of seconds before updating the LanguageCenter data. (default '60' seconds)\n```\n\nFor publishing the configuration file run:\n```\nphp artisan vendor:publish --provider=\"Novasa\\LaravelLanguageCenter\\TranslationServiceProvider\" --tag=\"config\"\n```\n\n# Usage\n\nYou can use the Laravel standard `trans`-function.\n\n```\ntrans('header.login');\n```\n\u003e will return the value of the string id `header.login`.    \n\u003e However if the string id for `header.login` does not exists it will return `header.login`.\n\n```\ntrans('header.welcome_back', [\n  'username' =\u003e 'Mark',\n])\n```\n\u003e Will return the value of the string id `header.welcome_back`, but will replace `:username` with `Mark` in the translation.\n\u003e However if the string id for `header.welcome_back` does not exists it will return `header.welcome_back`.\n\n```\ntrans([\n  'key' =\u003e 'header.hello_world',\n  'string' =\u003e 'Hello World!',\n])\n```\n\u003e Will return the value of the string id `header.hello_world`.\n\u003e However if the string id for `header.hello_world` does not exists it will return `Hello World!`.\n\n```\ntrans([\n  'key' =\u003e 'header.hello_user',\n  'string' =\u003e 'Hello :username!',\n], [\n  'username' =\u003e 'Mark',\n])\n```\n\u003e Will return the value of the string id `header.hello_user`, but will replace `:username` with `Mark` in the translation.\n\u003e However if the string id for `header.hello_user` does not exists it will return `Hello Mark!`.\n\n```\ntrans([\n  'key' =\u003e 'header.download',\n  'string' =\u003e 'You should download our iOS app!',\n  'platform' =\u003e 'ios',\n])\n```\n\u003e Will return the value of the string id `header.download`, but for the platorm `ios`.\n\u003e However if the string id for `header.download` does not exists it will return `You should download our iOS app!`.\n\n```\ntrans([\n  'key' =\u003e 'footer.copyright',\n  'string' =\u003e 'Copyright 2016 Novasa',\n  'comment' =\u003e 'A comment that you would like to show at the Language Center.',\n])\n```\n\u003e Will return the value of the string id `footer.copyright`.\n\u003e However if the string id for `footer.copyright` does not exists it will return `Copyright 2016 Novasa`.\n\u003e This will also add a comment to the Language Center.\n\n#### Note\nIf a translation does not exists it will automatically be created at the Language Center.\n\nAlso please note that the `locale` and `local_fallback` in the Laravel configurations are overwritten by the settings from the Language Center.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshapehq%2Flaravel-language-center","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshapehq%2Flaravel-language-center","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshapehq%2Flaravel-language-center/lists"}