Download the PHP package digitalcloud/multilingual-nova without Composer

On this page you can find all versions of the php package digitalcloud/multilingual-nova. 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 multilingual-nova

Multilingual Nova (using default nova fields)

Latest Version on Packagist Total Downloads

This package allows you to switch Nova language. Languages could be retrieved as array from config file or from database.

Requirements

Requirements Version
PHP ^8.0
Laravel ^8.0
Laravel Nova ~3.0

Installation

You can install the package via composer:

You can publish the config file:

This is the content of the file which will be published at config/multilingual.php

Usage

Nova Language Tool

You can use it as a tool by registering it with Nova. This is typically done in the tools method of the NovaServiceProvider, in app/Providers/NovaServiceProvider.php.

Nova Language Field:

You can add Multilingual field which will show languages to your resource.

Note: the field is a virtual field, and it's not required to be a database column. You can consider it as a language switcher input.

In index and detail page, the field will allow you to go to edit form with the selected language. In create and update page, the field allows you to change the language of inputs in the form in easy and direct way.

Model:

We use Spatie laravel translatable

Defining Locales

You can set the source of locales in the config file. Possible options is array or database. In case your language source is array, you need to add allowed languages in the locales array in the config file. When your language source is database, you need to configure the eloquent model of the language table, the column of the language code and the column of the language label.

Alternatively, you can override the config locales using setLocales(...) function:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Displaying Options

This tool allows you to switch between displaying style of the language selector field. Possible displaying options are button, list or mix. By default, the displaying style is button. If the field has a translation of a specific language, the button will be a blue one - primary button, and if no translation available the button will be grey - default button.

If your application supports many languages, this button displaying style is not suitable, so list displaying will be more suitable. With list displaying, locales are grouped in a dropdown list, allowing you to select an option from this list.

Other perfect option for displaying languages, is mix. It allows you to mix between button and list displaying options. For example, if the system supported less than three locales, then they will display as button otherwise list will be selected. This case can be achieved by setting the convert_to_list_after in the config file with 3 or whatever value you want.

Features

Roadmap

Screenshots

Index page

Create/Update page

mmmm

Language Tool

multiligual tool


All versions of multilingual-nova with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
spatie/laravel-translatable Version ^4.0
spatie/laravel-package-tools Version ^1.9
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 digitalcloud/multilingual-nova contains the following files

Loading the files please wait ....