PHPackages                             appointer/laravel-vue-i18n-bridge - 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. appointer/laravel-vue-i18n-bridge

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

appointer/laravel-vue-i18n-bridge
=================================

Exposes laravel translations through api routes.

1.0(9y ago)04261MITPHP

Since Mar 21Pushed 9y ago2 watchersCompare

[ Source](https://github.com/appointer/laravel-vue-i18n-bridge)[ Packagist](https://packagist.org/packages/appointer/laravel-vue-i18n-bridge)[ RSS](/packages/appointer-laravel-vue-i18n-bridge/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Laravel vue-i18n Bridge [![CircleCI](https://camo.githubusercontent.com/19122bb0a714a81b38036da9203570139303eca11b77c83ebd03f4496be4da7e/68747470733a2f2f636972636c6563692e636f6d2f67682f6170706f696e7465722f6c61726176656c2d7675652d6931386e2d6272696467652e7376673f7374796c653d737667)](https://circleci.com/gh/appointer/laravel-vue-i18n-bridge)
====================================================================================================================================================================================================================================================================================================================================================

[](#laravel-vue-i18n-bridge-)

Deprecation notice
------------------

[](#deprecation-notice)

THIS PACKAGE IS NO LONGER MAINTAINED SINCE THE DYNAMIC LOCALE FEATURE OF VUE-I18N IS DROPPED IN VERSION 6.x. IF THERE WILL BE ANYTHING LIKE THIS COMMING BACK TO VUE-I18N, WE MIGHT CONSIDER PICKING UP MAINTENANCE FOR THIS PACKAGE AGAIN.

This bridge gives you full freedom of translating your Vue (especially SPA) frontend with Laravels built-in translation techniques, without sacrificing frontend performance or general user experience. It ensures that only the client requested language has to be downloaded by the client. You are no longer forced to either maintain a second place for translation in javascript, or pregenerate a javascript file containing all your translated strings of all locales.

This package is designed to work in direct conjunction with [vue-i18n](https://github.com/kazupon/vue-i18n) and especially its [dynamic locale](https://kazupon.github.io/vue-i18n/dynamic.html) feature. However, it should be possible to make it work with other vue plugins or even other javascript frameworks with minimal javascript effort.

### Other approaches and inspiration

[](#other-approaches-and-inspiration)

Generating a javascript dictionary with your translatable strings may be totally fine for some use cases. If this is for you, you should totally check out Martin Lindhe's exceptional [laravel-vue-i18n-generator](https://github.com/martinlindhe/laravel-vue-i18n-generator).

**Credits to him and his package for inspiration.**

Installation
------------

[](#installation)

Navigate to your project and run the composer command:

```
composer require appointer/laravel-vue-i18n-bridge
```

The next step is to register the service provider:

```
// config/app.php
'providers' => [
    ...
    \Appointer\VueTranslation\VueTranslationServiceProvider::class,
];
```

Finally, you have to register the routes of this package:

```
// app/Providers/RouteServiceProvider.php
public function boot()
{
    parent::boot();

    Appointer\VueTranslation\VueTranslation::routes();
}
```

*(Optional)* If you want to, you can publish the config. This gives you full control over white- and blacklists amongst other things. Use the following artisan command:

```
php artisan vendor:publish --provider="Appointer\VueTranslation\VueTranslationServiceProvider::class" --tag="config"
```

**NOTE:** White- and blacklisting is also possible using the `VueTranslation::whitelist()` and `VueTranslation::blacklist()` methods respectively.

### Implementing the javascript

[](#implementing-the-javascript)

No worries, its a piece of cake. We are using `axios` as an example HTTP client. If you got a stock laravel frontend, you probably got it installed already. You just have to replace your current locale population with the following implementation:

```
// Keep in mind, that this requires the vue-i18n plugin.
// We are following https://kazupon.github.io/vue-i18n/dynamic.html

var lang = 'en';
Vue.locale(lang, function() {
    return axios.get('/i18n/' + lang)
        .then(function(response) {
            return Promise.resolve(response.data[lang]);
        })
        .catch(function(error) {
            return Promise.reject(error);
        });
}, function() {
    Vue.config.lang = lang;
});
```

#### Pitfalls

[](#pitfalls)

- Vendor translations are supported and loaded automatically. Though vue-i18n does not support namespacing (`{namespace}::{key}`) like laravel does, the vendor namespaces are part of the translation key (`{namespace}.{key}`).
- White- and blacklisting is currently only possible using the root group (the translation file like `auth.php` =&gt; `auth`) or namespace (`namespace::` =&gt; `namespace`) of a translation.

Testing
-------

[](#testing)

Tests can be executed using the command:

```
./vendor/bin/phpunit
```

Contibuting
-----------

[](#contibuting)

Every help is very welcome. Do you got an issue, or having a great idea for extending this project? Feel free to open a pull request or submit an issue.

If you file a bug report, your issue should contain a title and a clear description of the issue. You should also include as much relevant information as possible and a code sample that demonstrates the issue. The goal of a bug report is to make it easy for yourself - and others - to replicate the bug and develop a fix.

Please use the [issue tracker](https://github.com/appointer/laravel-vue-i18n-bridge/issues) to report issues.

License
-------

[](#license)

This library is open-sourced software licensed under the [MIT](https://github.com/appointer/laravel-vue-i18n-bridge/blob/master/LICENSE.md) license.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3389d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66b7ba4883b966d7bf0014f8353156d29d7d76abaa4d05606f2cc374310a45e9?d=identicon)[fgreinus](/maintainers/fgreinus)

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

---

Top Contributors

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

---

Tags

internationalizationlaravellaravel-5-packagelaravel-packagelocalizationtranslationvuevue-i18n

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[illuminate/translation

The Illuminate Translation package.

6938.0M564](/packages/illuminate-translation)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[moonshine/moonshine

Laravel administration panel

1.3k253.1k78](/packages/moonshine-moonshine)[elegantly/laravel-translator

All on one translations management for Laravel

6333.1k](/packages/elegantly-laravel-translator)

PHPackages © 2026

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