PHPackages                             rnr1721/multilingual-laravel - 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. rnr1721/multilingual-laravel

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

rnr1721/multilingual-laravel
============================

Laravel implementation for multilingual support (language switcher and URL prefixes)

1.0.0(1y ago)02MITPHPPHP ^8.1

Since Dec 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rnr1721/multilingual-laravel)[ Packagist](https://packagist.org/packages/rnr1721/multilingual-laravel)[ RSS](/packages/rnr1721-multilingual-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

### Laravel Multilingual Support Package (Languge switcher)

[](#laravel-multilingual-support-package-languge-switcher)

This package provides multilingual support for Laravel applications, allowing easy management of multiple languages, automatic URL prefixing, language switching and locale handling.

Looking for a robust multilingual solution for your Laravel project? This package provides a clean, efficient way to handle multiple languages in your web applications with a focus on developer experience and SEO-friendly URLs.

What makes it special? Unlike traditional approaches, it separates core multilingual logic from framework implementation, making it more maintainable and portable. You get automatic language detection from URLs, smart prefix handling, and seamless locale switching - all while maintaining Laravel's elegant syntax and routing flexibility.

The package is production-ready with features like RTL support, automatic SEO-friendly URL generation, and comprehensive Blade integration. It's thoroughly tested and follows Laravel best practices, making it a reliable choice for projects of any size - from small corporate websites to large international platforms.

Integration is a breeze: just install the package, define your languages in config, and use the intuitive multilingual() route macro. The package handles all the complexities of language switching and URL generation while keeping your code clean and maintainable. No database queries, minimal overhead, and maximum flexibility - just the way Laravel developers like it.

Requirements:
-------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.0 or higher
- rnr1721/multilingual-core: ^1.0 (installed automatically as requirement)

Installation in project
-----------------------

[](#installation-in-project)

```
composer require rnr1721/multilingual-laravel
```

Features:
---------

[](#features)

- Automatic language detection from URL
- Language prefix management in URLs
- Blade directives for language switching
- Route macro for multilingual routes
- Automatic framework locale switching
- View variables for language data
- RTL language support

Middleware: No need to manually manage language detection; LaravelLanguageMiddleware automatically switches the current language based on the URL.

Configuration:
--------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="rnr1721\MultilingualLaravel\LaravelMultilingualServiceProvider" --tag="config"
```

Configure your languages in config/multilingual.php:

```
