PHPackages                             webard/nova-language-switch - 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. webard/nova-language-switch

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

webard/nova-language-switch
===========================

A Laravel Nova package to switch language in your application

v2.1.0(2y ago)04.1k↓100%MITPHPPHP ^7.3|^8.0

Since Feb 8Pushed 2y agoCompare

[ Source](https://github.com/webard/nova-language-switch)[ Packagist](https://packagist.org/packages/webard/nova-language-switch)[ Docs](https://github.com/webard/nova-language-switch)[ RSS](/packages/webard-nova-language-switch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

A Laravel Nova Tool to add language switcher to your application
----------------------------------------------------------------

[](#a-laravel-nova-tool-to-add-language-switcher-to-your-application)

Original package:

This [Nova](https://nova.laravel.com) tool lets you:

- Add a Language switcher to the header of the nova application.
- Handle Switch language and put the current locale to Laravel session to remember language from multiple browsers.
- Switch the direction of the application based on the RTL-supported application written in config.
- Enable or disable showing language name

Requirements
------------

[](#requirements)

- `php: >=8.0`
- `laravel/nova: ^4.0`

    > ```
    >  Note: This package dose't work with nova 3
    >
    > ```

Features
--------

[](#features)

- Add multiple languages from the config.
- Remember set local based on cache no need to save in the database table
- Auto inject to the header of the application
- Just 4 steps to setup

Screenshot
----------

[](#screenshot)

|[![enter image description here](https://raw.githubusercontent.com/badinansoft/nova-language-switch/master/docs/en-screenshot.png)](https://raw.githubusercontent.com/badinansoft/nova-language-switch/master/docs/en-screenshot.png) |[![enter image description here](https://raw.githubusercontent.com/badinansoft/nova-language-switch/master/docs/ar-screenshot.png)](https://raw.githubusercontent.com/badinansoft/nova-language-switch/master/docs/ar-screenshot.png) |

Installation
------------

[](#installation)

You can install the nova tool in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require webard/nova-language-switch
```

Next up, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider`.

```
// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
    return [
        // ...
        new \Badinansoft\LanguageSwitch\LanguageSwitch(),
    ];
}
```

Next up, must you publish the config file with for add your languages:

```
php artisan vendor:publish --provider="Badinansoft\LanguageSwitch\ToolServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
