PHPackages                             saniolab/laravel-vue-i18n-generator - 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. saniolab/laravel-vue-i18n-generator

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

saniolab/laravel-vue-i18n-generator
===================================

Generates a vue-i18n compatible include file from your Laravel translations.

1.0.0(3mo ago)01.6k↓67.4%[3 PRs](https://github.com/saniolab/laravel-vue-i18n-generator/pulls)MITPHPPHP ^8.3CI passing

Since Nov 9Pushed 5d agoCompare

[ Source](https://github.com/saniolab/laravel-vue-i18n-generator)[ Packagist](https://packagist.org/packages/saniolab/laravel-vue-i18n-generator)[ Docs](https://github.com/saniolab/laravel-vue-i18n-generator)[ RSS](/packages/saniolab-laravel-vue-i18n-generator/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (55)Used By (0)

About
-----

[](#about)

[![Tests](https://github.com/saniolab/laravel-vue-i18n-generator/actions/workflows/run-tests.yml/badge.svg)](https://github.com/saniolab/laravel-vue-i18n-generator/actions/workflows/run-tests.yml)

Generates a [vue-i18n](https://vue-i18n.intlify.dev/) compatible bundle from your [Laravel translations](https://laravel.com/docs/13.x/localization), for use with a [Vue](https://vuejs.org/) front end. Optional [vuex-i18n](https://github.com/dkfbasel/vuex-i18n) output is supported via config.

This package is a maintained fork of .

### Requirements

[](#requirements)

- PHP 8.2 or higher (use a version that matches your Laravel release)
- Laravel 12 or 13

Install
-------

[](#install)

```
composer require saniolab/laravel-vue-i18n-generator --dev
```

The service provider is registered automatically via `composer.json` `extra.laravel.providers`.

Publish the config when you need to customize paths or the target i18n library:

```
php artisan vendor:publish --provider="Saniolab\VueInternationalizationGenerator\GeneratorProvider"
```

Adjust `jsPath`, `jsFile`, and other options in `config/vue-i18n-generator.php` as needed.

Using vue-i18n
--------------

[](#using-vue-i18n)

Install the Vue library, then generate the locale file:

```
npm i vue-i18n
```

```
php artisan vue-i18n:generate
```

The default **es6** output is a module with a **default export** (a locale → messages map). Example with Vue 3 and vue-i18n 9+:

```
import { createApp } from 'vue';
import { createI18n } from 'vue-i18n';
import messages from './vue-i18n-locales.generated';

const i18n = createI18n({
    legacy: false,
    locale: document.documentElement.lang.slice(0, 2),
    messages,
});

createApp(App).use(i18n).mount('#app');
```

Using vuex-i18n
---------------

[](#using-vuex-i18n)

```
npm i vuex-i18n vuex
```

In `config/vue-i18n-generator.php`, set `'i18nLib' => 'vuex-i18n'`, then run `php artisan vue-i18n:generate`.

```
import Vue from 'vue';
import Vuex from 'vuex';
import vuexI18n from 'vuex-i18n';
import Locales from './vue-i18n-locales.generated.js';

const store = new Vuex.Store();

Vue.use(vuexI18n.plugin, store);

Vue.i18n.add('en', Locales.en);
Vue.i18n.add('de', Locales.de);
Vue.i18n.set(startLocale);
```

Output formats
--------------

[](#output-formats)

Use `--format` with `es6` (default), `umd`, or `json`:

```
php artisan vue-i18n:generate --format umd
```

With **umd**, the bundle exposes `window.vuei18nLocales` for use without a bundler.

Multiple files (lazy loading)
-----------------------------

[](#multiple-files-lazy-loading)

```
php artisan vue-i18n:generate --multi
php artisan vue-i18n:generate --multi-locales
```

Parameters (named placeholders)
-------------------------------

[](#parameters-named-placeholders)

Laravel `:name` placeholders are converted to vue-i18n `{name}` style.

`lang/en/message.php`:

```
return [
    'hello' => 'Hello :name',
];
```

Vue:

```
{{ $t('message.hello', { name: 'visitor' }) }}
```

Notices
-------

[](#notices)

- Default output is an ES6 module (`export default …`).
- Advanced Laravel pluralization as in the [docs](https://laravel.com/docs/13.x/localization#pluralization) is not fully mirrored in vue-i18n / vuex-i18n in all cases.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance92

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~77 days

Recently: every ~557 days

Total

50

Last Release

95d ago

Major Versions

0.1.48 → 1.0.02026-03-23

PHP version history (3 changes)0.1.0PHP &gt;=5.4.0

0.1.1PHP &gt;=5.5.0

1.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac14ae1d966d2e64dc0eafb28a747b95e34069e1ddeabfcd5d6709569f4e9b19?d=identicon)[okaufmann](/maintainers/okaufmann)

---

Top Contributors

[![martinlindhe](https://avatars.githubusercontent.com/u/181531?v=4)](https://github.com/martinlindhe "martinlindhe (52 commits)")[![okaufmann](https://avatars.githubusercontent.com/u/4414498?v=4)](https://github.com/okaufmann "okaufmann (25 commits)")[![murrant](https://avatars.githubusercontent.com/u/39462?v=4)](https://github.com/murrant "murrant (12 commits)")[![Jellyfrog](https://avatars.githubusercontent.com/u/759887?v=4)](https://github.com/Jellyfrog "Jellyfrog (5 commits)")[![voydz](https://avatars.githubusercontent.com/u/373533?v=4)](https://github.com/voydz "voydz (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![matthewnessworthy](https://avatars.githubusercontent.com/u/5653887?v=4)](https://github.com/matthewnessworthy "matthewnessworthy (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![madeITBelgium](https://avatars.githubusercontent.com/u/20304892?v=4)](https://github.com/madeITBelgium "madeITBelgium (2 commits)")[![marcoocram](https://avatars.githubusercontent.com/u/6926933?v=4)](https://github.com/marcoocram "marcoocram (2 commits)")[![netpok](https://avatars.githubusercontent.com/u/6945600?v=4)](https://github.com/netpok "netpok (2 commits)")[![jcharcosset](https://avatars.githubusercontent.com/u/36884315?v=4)](https://github.com/jcharcosset "jcharcosset (1 commits)")[![Xenonym](https://avatars.githubusercontent.com/u/1782590?v=4)](https://github.com/Xenonym "Xenonym (1 commits)")[![iben12](https://avatars.githubusercontent.com/u/2972954?v=4)](https://github.com/iben12 "iben12 (1 commits)")[![Naoray](https://avatars.githubusercontent.com/u/10154100?v=4)](https://github.com/Naoray "Naoray (1 commits)")[![ottoszika](https://avatars.githubusercontent.com/u/7945963?v=4)](https://github.com/ottoszika "ottoszika (1 commits)")[![rabrowne85](https://avatars.githubusercontent.com/u/8293543?v=4)](https://github.com/rabrowne85 "rabrowne85 (1 commits)")[![Raymonf](https://avatars.githubusercontent.com/u/8991740?v=4)](https://github.com/Raymonf "Raymonf (1 commits)")[![RSchwan](https://avatars.githubusercontent.com/u/9384498?v=4)](https://github.com/RSchwan "RSchwan (1 commits)")[![sandofvega](https://avatars.githubusercontent.com/u/34006175?v=4)](https://github.com/sandofvega "sandofvega (1 commits)")

---

Tags

laravelvue-i18n

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saniolab-laravel-vue-i18n-generator/health.svg)

```
[![Health](https://phpackages.com/badges/saniolab-laravel-vue-i18n-generator/health.svg)](https://phpackages.com/packages/saniolab-laravel-vue-i18n-generator)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k199.2M1.2k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

9782.1M162](/packages/laravel-ai)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M120](/packages/laravel-mcp)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M153](/packages/spatie-laravel-health)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4821.5k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

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