Download the PHP package outl1ne/nova-translatable without Composer

On this page you can find all versions of the php package outl1ne/nova-translatable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nova-translatable

Nova Translatable

Latest Version on Packagist Total Downloads

This Laravel Nova allows you to make any input field spatie/laravel-translatable compatible and localisable.

Requirements

Features

Known non-working fields

Limitations

Screenshots

Installation

Firstly, set up spatie/laravel-translatable.

Install the package in a Laravel Nova project via Composer:

Usage

Call ->translatable() on any field, like so:

Validation

It's possible to define locale specific validation rules.

To do so, add the ->rulesFor() on your field and the HandlesTranslatable trait to your Nova resource.

->rulesFor accepts array|string|callable locales and array|callable rules.

In this example, rules will be added to the following values

Configuration

You can define default locales for all the translatable fields in the config file. The config file can be published using:

Fill other locales from config option

The configuration option fill_other_locales_from allows you to pre-fill other locales from just one locale. This requires the resources to also have the HandlesTranslatable trait.

One select for all fields on a page

If you don't want to display the locale select next to each field, you can set the display_type to none and add a Outl1ne\NovaTranslatable\Fields\LocaleSelect field to your Nova resource. This will render a single select for all fields.

Custom locale display

To customize the locale display you can use Nova::provideToScript to pass customLocaleDisplay as in the example below.

Edge cases

BelongsToMany allowDuplicateRelations corner-case

When using this field inside a BelongsToMany as a pivot field with ->allowDuplicateRelations() and you want to filter out exact matches using the NotExactlyAttached rule, use the BelongsToManyTranslatable field instead of the regular BelongsToMany.

Credits

License

This project is open-sourced software licensed under the MIT license.


All versions of nova-translatable with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
laravel/nova Version ^5.0
spatie/laravel-translatable Version ^4.0 || ^5.0 || ^6.0 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package outl1ne/nova-translatable contains the following files

Loading the files please wait ....