bleuren / jetstream-livewire-i18n
A Laravel package to add multi-language support to Jetstream with Livewire
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^8.2
- laravel/framework: ^12.0
- laravel/jetstream: ^5.3
- livewire/livewire: ^3.0
This package is auto-updated.
Last update: 2025-03-04 10:25:17 UTC
README
A Laravel package that provides multi-language support for Jetstream with Livewire, supporting English (en
) and Traditional Chinese (zh_TW
).
Installation
- Install via Composer:
composer require bleuren/jetstream-livewire-i18n
- Publish resources:
php artisan jetstream-i18n:publish
- (Optional) Publish with overwrite:
php artisan jetstream-i18n:publish --force
Features
- Provides translations for all Jetstream views
- Supports English and Traditional Chinese out of the box
- Easy to extend with additional languages
Directory Structure
project/
├── lang/ # Language files
│ ├── en/ # English translations
│ └── zh_TW/ # Traditional Chinese translations
└── resources/
└── views/
├── api/ # API management views
├── auth/ # Authentication views
├── emails/ # Email template views
├── profile/ # Profile management views
└── teams/ # Team management views
Usage
Ensure your Jetstream views use translation functions:
<h1>{{ __('jetstream.dashboard') }}</h1>
Publishing Specific Resources
You can publish specific resources using the following commands:
# Publish Jetstream view overrides php artisan vendor:publish --tag=jetstream-livewire-i18n-views-jetstream # Publish language files php artisan vendor:publish --tag=jetstream-livewire-i18n-lang
Requirements
- PHP 8.2+
- Laravel 12.0+
- Livewire 3.0+
- Jetstream 5.3+
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.