Download the PHP package appointer/laravel-vue-i18n-bridge without Composer

On this page you can find all versions of the php package appointer/laravel-vue-i18n-bridge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-vue-i18n-bridge

Laravel vue-i18n Bridge CircleCI

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 and especially its dynamic locale 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

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.

Credits to him and his package for inspiration.

Installation

Navigate to your project and run the composer command:

The next step is to register the service provider:

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

(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:

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

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:

Pitfalls

Testing

Tests can be executed using the command:

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 to report issues.

License

This library is open-sourced software licensed under the MIT license.


All versions of laravel-vue-i18n-bridge with dependencies

PHP Build Version
Package Version
Requires illuminate/translation Version ^5.4
illuminate/contracts Version ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package appointer/laravel-vue-i18n-bridge contains the following files

Loading the files please wait ....