Download the PHP package rnr1721/multilingual-laravel without Composer
On this page you can find all versions of the php package rnr1721/multilingual-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rnr1721/multilingual-laravel
More information about rnr1721/multilingual-laravel
Files in rnr1721/multilingual-laravel
Package multilingual-laravel
Short Description Laravel implementation for multilingual support (language switcher and URL prefixes)
License MIT
Informations about the package multilingual-laravel
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:
- PHP 8.1 or higher
- Laravel 10.0 or higher
- rnr1721/multilingual-core: ^1.0 (installed automatically as requirement)
Installation in project
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:
Publish the configuration file:
Configure your languages in config/multilingual.php:
Usage:
- Define multilingual routes:
This will create routes for all configured languages:
- / and /about for English (default)
- /es and /es/about for Spanish
-
Use in templates:
-
Generate language-specific URLs:
- Available helper functions:
- language_route($name, $parameters = [], $language = null)
- language_url($path, $parameters = [], $language = null)
- current_language()
- available_languages()
- page_links()
- Available view variables:
- $currentLanguage - Current language object
- $languages - Array of all available languages
- $pageLinks - Array of language URLs for current page
- Translations:
Place your translation files in resources/lang/{locale}/ directories matching the locales in your config:
resources/ └── lang/ ├── en_US/ │ └── messages.php └── es_ES/ └── messages.php
Use translations in templates:
Testing:
Code Style:
Static Analysis:
License:
MIT
Credits:
Eugeny G [email protected]
For more detailed documentation and examples, please visit the GitHub repository.
All versions of multilingual-laravel with dependencies
rnr1721/multilingual-core Version ^1.0
laravel/framework Version ^10.0
illuminate/support Version ^10.0
illuminate/contracts Version ^10.0