Download the PHP package mvenghaus/filament-plugin-translatable-inline without Composer

On this page you can find all versions of the php package mvenghaus/filament-plugin-translatable-inline. 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 filament-plugin-translatable-inline

Filament Plugin - Translatable Inline

This is an addon to Spatie Translatable that allows you to edit your translation directly below the field.

This approach offers several advantages:

Screenshots

Screenshot

Requirements

You need the latest version of Filament v3.

This package is based on:

You don't need to install them separately, it's handled via dependencies.

Installation

Install the package via composer:

Configuration

Since it is based on the Spatie plugin, it must be registered as described in the documentation.

NOTE: It is important that you don't add the traits and the header action to your form resource pages, or it won't work! Only the trait "Translatable" in your resource is required!

Instead of having a locale switcher in a dropdown above, you add a container for each translatable field.

Before

After

For each field that can be translated, simply repeat this process, and you'll be done.

NOTE: You don't have to globally choose between inline or dropdown. Instead, you can choose an option on each page. For instance, it makes sense to have the dropdown in the list view and then use the inline version when editing.

Options

onlyMainLocaleRequired

Sometimes you might want the field to be required, but only for the primary language. For example, if you set the TextInput to 'required,' it applies to all language variants. This is where this option comes into play. It removes the 'required' validation for all other languages except the primary one.

requireLocales

If you have more than one required locales you can pass an array to this method.

Tipps & Hints

Validation

If all of your locales are required and if your values do not pass the JS validation, then the variants will remain automatically expanded.

afterStateUpdated

If you want to use "afterStateUpdated", you have to consider that the state path shifts by one level. n addition, one must specify the locale which is located in the component's meta under the key "locale".

Before

After

Empty translations

Screenshot

As you can see in the screenshot, the "nl" is not filled and therefore not marked.

Contact

If you any questions or you find a bug, please contact me via email.


All versions of filament-plugin-translatable-inline with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/forms Version ^3.0
filament/spatie-laravel-translatable-plugin Version ^3.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 mvenghaus/filament-plugin-translatable-inline contains the following files

Loading the files please wait ....