PHPackages                             kongulov/nova-tab-translatable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kongulov/nova-tab-translatable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kongulov/nova-tab-translatable
==============================

Making Nova Tab Translatable

2.1.7(11mo ago)8559.5k↓34%17[11 issues](https://github.com/kongulov/nova-tab-translatable/issues)2MITPHPPHP ^8.0

Since Aug 10Pushed 11mo ago3 watchersCompare

[ Source](https://github.com/kongulov/nova-tab-translatable)[ Packagist](https://packagist.org/packages/kongulov/nova-tab-translatable)[ Docs](https://github.com/kongulov/nova-tab-translatable)[ GitHub Sponsors](https://github.com/kongulov)[ RSS](/packages/kongulov-nova-tab-translatable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (43)Used By (2)

Making Laravel Nova Tab Translatable Nova 5 ready
=================================================

[](#making-laravel-nova-tab-translatable-nova-5-ready)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fd7e5e9827ceede5e4d7add0b8795d4986b594cd2677b23ebf2e3c9c354cbe08/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f6e67756c6f762f6e6f76612d7461622d7472616e736c617461626c653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kongulov/nova-tab-translatable)[![Licence](https://camo.githubusercontent.com/2fbc2fa97ce099da6c75981f2934e95bd2ae654fb94575d832f07a732c9746c0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6f6e67756c6f762f6e6f76612d7461622d7472616e736c617461626c653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/2fbc2fa97ce099da6c75981f2934e95bd2ae654fb94575d832f07a732c9746c0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b6f6e67756c6f762f6e6f76612d7461622d7472616e736c617461626c653f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/09fb70c0635595d23d2ada416cc3700fe7a28f09bb42ba58891b4e50eddb1d2e/68747470733a2f2f706f7365722e707567782e6f72672f6b6f6e67756c6f762f6e6f76612d7461622d7472616e736c617461626c652f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/kongulov/nova-tab-translatable)

This package contains a `NovaTabTranslatable` class you can use to make any Nova field type translatable with tabs. Use the master branch for Nova 5 and the 1.x branch for Nova 4.

Imagine you have this `fields` method in a Post Nova resource:

```
use Kongulov\NovaTabTranslatable\NovaTabTranslatable;

...

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        NovaTabTranslatable::make([
            SluggableText::make('Title')->slug('Slug'),
            Slug::make('Slug')->readonly(),
            Trix::make('text'),
            Text::make('Keywords'),
            Text::make('Description'),
        ]),
    ];
}
```

That Post Nova resource will be rendered like this.

[![screenshot](https://camo.githubusercontent.com/773e64df254bf8bf0fe88b3841077761cb67978867a8563970e0a7b89bf5cb87/68747470733a2f2f6b6f6e67756c6f762e6769746875622e696f2f7369746573637265656e73686f74732f6b6f6e67756c6f765f6e6f76612d7461622d7472616e736c617461626c655f312e706e673f763d34)](https://camo.githubusercontent.com/773e64df254bf8bf0fe88b3841077761cb67978867a8563970e0a7b89bf5cb87/68747470733a2f2f6b6f6e67756c6f762e6769746875622e696f2f7369746573637265656e73686f74732f6b6f6e67756c6f765f6e6f76612d7461622d7472616e736c617461626c655f312e706e673f763d34)[![screenshot](https://camo.githubusercontent.com/4fc3bcb986571fc3038ad4e09818b32f89aaf53e964877cffe16d9a5351360bb/68747470733a2f2f6b6f6e67756c6f762e6769746875622e696f2f7369746573637265656e73686f74732f6b6f6e67756c6f765f6e6f76612d7461622d7472616e736c617461626c655f322e706e673f763d34)](https://camo.githubusercontent.com/4fc3bcb986571fc3038ad4e09818b32f89aaf53e964877cffe16d9a5351360bb/68747470733a2f2f6b6f6e67756c6f762e6769746875622e696f2f7369746573637265656e73686f74732f6b6f6e67756c6f765f6e6f76612d7461622d7472616e736c617461626c655f322e706e673f763d34)

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

[](#requirements)

- `php: >=7.1.0`
- `spatie/laravel-translatable: ^4.0`

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

[](#installation)

Install the package in a Laravel Nova project via Composer:

```
# Install nova-tab-translatable
composer require kongulov/nova-tab-translatable

# Publish configuration
php artisan vendor:publish --tag="tab-translatable-config"
```

This is the contents of the file which will be published at `config/tab-translatable.php`

```
