{"id":13717867,"url":"https://github.com/overtrue/laravel-lang","last_synced_at":"2025-09-29T02:32:04.001Z","repository":{"id":28636379,"uuid":"32155295","full_name":"overtrue/laravel-lang","owner":"overtrue","description":":earth_asia: 75 languages support for Laravel application.","archived":true,"fork":false,"pushed_at":"2022-07-26T23:10:59.000Z","size":106,"stargazers_count":1271,"open_issues_count":6,"forks_count":146,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-09-26T04:41:59.876Z","etag":null,"topics":["i18n","laravel","localization"],"latest_commit_sha":null,"homepage":"","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/overtrue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["overtrue"]}},"created_at":"2015-03-13T12:44:38.000Z","updated_at":"2024-07-17T03:17:18.000Z","dependencies_parsed_at":"2022-07-16T17:46:57.823Z","dependency_job_id":null,"html_url":"https://github.com/overtrue/laravel-lang","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Flaravel-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overtrue","download_url":"https://codeload.github.com/overtrue/laravel-lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234583683,"owners_count":18856280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["i18n","laravel","localization"],"created_at":"2024-08-03T00:01:28.335Z","updated_at":"2025-09-29T02:31:58.725Z","avatar_url":"https://github.com/overtrue.png","language":"PHP","funding_links":["https://github.com/sponsors/overtrue"],"categories":["PHP","国际化和本地化(Internationalisation and Localisation)"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLaravel-lang\u003c/h1\u003e\n\u003cp align=\"center\"\u003e75 languages support for Laravel application based on \u003ca href=\"https://github.com/Laravel-Lang/lang\"\u003eLaravel-Lang/lang\u003c/a\u003e.\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/overtrue/laravel-lang\"\u003e\u003cimg alt=\"For Laravel 5\" src=\"https://img.shields.io/badge/laravel-ready-green.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/overtrue/laravel-lang\"\u003e\u003cimg alt=\"For Lumen 5\" src=\"https://img.shields.io/badge/lumen-ready-green.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/overtrue/laravel-lang\"\u003e\u003cimg alt=\"Latest Stable Version\" src=\"https://img.shields.io/packagist/v/overtrue/laravel-lang.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/overtrue/laravel-lang\"\u003e\u003cimg alt=\"Latest Unstable Version\" src=\"https://img.shields.io/packagist/vpre/overtrue/laravel-lang.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/overtrue/laravel-lang\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/packagist/dt/overtrue/laravel-lang.svg?maxAge=2592000\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/overtrue/laravel-lang\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/packagist/l/overtrue/laravel-lang.svg?maxAge=2592000\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003e **Warning**\n\u003e\n\u003e There is already a better solution to use [our official Laravel-Lang publisher](https://publisher.laravel-lang.com/). This project will be discontinued, thank you for your support.\n\n# Features\n\n- Laravel 5+ \u0026\u0026 Lumen support.\n- Translations Publisher.\n- Made with 💖.\n\n# Install\n\n| Laravel version | Composer command                              |\n| --------------- | --------------------------------------------- |\n| Laravel 9.x     | `composer require overtrue/laravel-lang:~6.0` |\n| Laravel 7.x-8.x | `composer require overtrue/laravel-lang:~5.0` |\n| Laravel 6.x     | `composer require overtrue/laravel-lang:~4.0` |\n| Laravel 5.8     | `composer require overtrue/laravel-lang:~3.0` |\n| Laravel 5.1-5.7 | `composer require overtrue/laravel-lang:~2.0` |\n| Laravel 5       | `composer require overtrue/laravel-lang:~1.0` |\n\n```shell\ncomposer require \"overtrue/laravel-lang:~6.0\"\n```\n\n#### Lumen\n\nAdd the following line to `bootstrap/app.php`:\n\n```php\n$app-\u003eregister(Overtrue\\LaravelLang\\TranslationServiceProvider::class);\n```\n\n# Configuration\n\n### Laravel\n\nyou can change the locale at `config/app.php`:\n\n```php\n'locale' =\u003e 'zh_CN',\n```\n\n### Lumen\n\nset locale in `.env` file:\n\n```\nAPP_LOCALE=zh_CN\n```\n\n# Usage\n\nThere is no difference with the usual usage.\n\nIf you need to add additional language content, Please create a file in the `resources/lang/{LANGUAGE}` directory.\n\n### Add custom language items\n\nHere, for example in Chinese:\n\n`resources/lang/zh_CN/demo.php`:\n\n```php\n\u003c?php\n\nreturn [\n    'user_not_exists'    =\u003e '用户不存在',\n    'email_has_registed' =\u003e '邮箱 :email 已经注册过！',\n];\n```\n\nUsed in the template:\n\n```php\necho trans('demo.user_not_exists'); // 用户不存在\necho trans('demo.email_has_registed', ['email' =\u003e 'anzhengchao@gmail.com']);\n// 邮箱 anzhengchao@gmail.com 已经注册过！\n```\n\n### Replace the default language items partially\n\nWe assume that want to replace the `password.reset` message:\n\n`resources/lang/zh_CN/passwords.php`:\n\n```php\n\u003c?php\n\nreturn [\n    'reset' =\u003e '您的密码已经重置成功了，你可以使用新的密码登录了!',\n];\n```\n\nYou need only add the partials item what you want.\n\n### publish the language files to your project `resources/lang/` directory\n\n```shell\nphp artisan lang:publish [LOCALES] {--force}\n```\n\nexamples:\n\n```shell\nphp artisan lang:publish zh_CN,zh_HK,th,tk\n```\n\n## :heart: Sponsor me\n\n[![Sponsor me](https://github.com/overtrue/overtrue/blob/master/sponsor-me.svg?raw=true)](https://github.com/sponsors/overtrue)\n\n如果你喜欢我的项目并想支持它，[点击这里 :heart:](https://github.com/sponsors/overtrue)\n\n## Project supported by JetBrains\n\nMany thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects.\n\n[![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/overtrue)\n\n## PHP 扩展包开发\n\n\u003e 想知道如何从零开始构建 PHP 扩展包？\n\u003e\n\u003e 请关注我的实战课程，我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Flaravel-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovertrue%2Flaravel-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Flaravel-lang/lists"}