PHPackages                             lyxxxh/larlang - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. lyxxxh/larlang

ActiveLibrary[Localization &amp; i18n](/categories/localization)

lyxxxh/larlang
==============

laravel根据 (表字段和自定义文件)生成各国语言包

012PHP

Since Jun 13Pushed 6y agoCompare

[ Source](https://github.com/lyxxg/larlang)[ Packagist](https://packagist.org/packages/lyxxxh/larlang)[ RSS](/packages/lyxxxh-larlang/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[点击查看演示](https://gz.bcebos.com/v1/xxh-download/lang.gif)

### 安装

[](#安装)

```
 composer require lyxxxh/larlang

 添加服务提供者
 Xxh\LarTran\LarTranProvider::class  //依赖此服务做翻译
 Xxh\LarLang\LarLangProvider::class

 发布配置
 php artisan vendor:publish --provider="Xxh\LarLang\LarLangProvider"

```

### 配置说明

[](#配置说明)

字段说明默认lang要生成的语言包\['zh','en','cht'\]forget\_table忽略生成语言包的表看配置forget\_field忽略翻译的字段\['id'\]使用
--

[](#使用)

### 生成路径

[](#生成路径)

一切都生成在resource/lang

### 初始化所有表字段的语言包

[](#初始化所有表字段的语言包)

```
 php artisan lang:table:init comment  根据表注释创建语言包(没有注释就用字段)

 php artisan lang:table:init   根据表字段创建语言包
 默认使用百度翻译  翻译不是我理想的效果
 例如 id被翻译成 身份证件  所以建议根据表注释创建

```

### 根据文件夹 (绝对路径)

[](#根据文件夹-绝对路径)

```
php artisan lang:folder E:\hello\tem

```

### 根据文件 (绝对路径)

[](#根据文件-绝对路径)

```
php artisan lang:file E:\hello\tem\hello.php

```

### 扯淡

[](#扯淡)

```
依赖于Xxh\LarTran\LarTranProvider做翻译
有一个中文语言包，要中 英 繁 多语言等等
再复制语言包，翻译，复制，翻译，复制。。。。
蛋疼  用于解决这种蛋疼的情况

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fbda2846ce7576ecbef245263ab795e62a1ea4a31c6d58bfdea89e20194ec90?d=identicon)[lyxxg](/maintainers/lyxxg)

---

Top Contributors

[![lyxxxh](https://avatars.githubusercontent.com/u/35553218?v=4)](https://github.com/lyxxxh "lyxxxh (2 commits)")

### Embed Badge

![Health badge](/badges/lyxxxh-larlang/health.svg)

```
[![Health](https://phpackages.com/badges/lyxxxh-larlang/health.svg)](https://phpackages.com/packages/lyxxxh-larlang)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
