fixers/jetstream-inertia-i18n

An implementation of translatable Vue components for Laravel Jetstream with the Inertia stack

v0.0.2 2023-09-29 06:17 UTC

This package is auto-updated.

Last update: 2024-05-29 07:43:39 UTC


README

This package contains a method to easily enable translation of Vue components within Laravel Jetstream projects built with the Inertia stack.

This package is not compatible with the Livewire stack.

The implementation uses vue-i18n.

Warning

This will overwrite the Vue components, layout and pages that come with Jetstream, and add the necessary code to enable translation. If you have made changes to these files, you will need to merge them manually.

Using this package should be done at the start of a project, before making any changes to the Jetstream components.

Installation

You can install the package via composer:

composer require fixers/jetstream-inertia-i18n --dev

The package uses Laravel's auto-discovery feature to register the service provider.

When ready to publish the package's config file, run the following command:

php artisan fixers:publish-components

This will introduce you to a warning message, asking you to confirm the publishing of the package's files.

You will also be prompted to include any of the available languages in the package.

You are welcome to contribute with your custom language file as a Pull Request.

TODO

  • Add something that ensures we are up to date with Jetstream's components
  • Add more languages