Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel View Localization Laravel Package

vxm/laravel-view-localization

View on GitHub
Deep Wiki
Context7

About it

A package support you dynamic render view by user locale for Laravel application.

Installation

Require Laravel View Localization using Composer:

composer require vxm/laravel-view-localization

You need to publish the config-file with:

php artisan vendor:publish --provider="VXM\ViewLocalization\ViewLocalizationServiceProvider" --tag="config"

This is the contents of the published config file:

return [
    /**
     * Your source language locale.
     */
    'sourceLocale' => 'en',
];

Usage

It is a way to replace a set of views with another by user locale without the need of touching the original view rendering code. You can use it to systematically change the look and feel of an application depend on user locale. For example, when call view('about'), you will be rendering the view file resources/views/about.blade.php, if user locale is vi, the view file resources/views/vi/about.blade.php will be rendered, instead.

Note: If the application locale is the same as source locale original view will be rendered regardless of presence of translated view.

The package will automatically register itself. Now your application can dynamic render view by user locale.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle