Download the PHP package dejodev/laravel-multi-language-strings without Composer

On this page you can find all versions of the php package dejodev/laravel-multi-language-strings. 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 laravel-multi-language-strings

Laravel Multi Language strings package

The Laravel Multi Language Strings package allows you to easily store and manage multilanguage strings in a JSON field within a database table. It provides a MultiLanguageString class and an attribute cast for Eloquent models, which are aware of Laravel locale and fallback locale settings. This package simplifies the process of setting and retrieving multilanguage strings, ensuring seamless localization support in your Laravel applications.

Installation

Install the package via composer:

Add a JSON field to your database migration to store the multilanguage strings.

Add the MultiLanguageString class to your model's $casts property.

Usage

You can now use the MultiLanguageString class to store multilanguage strings in your Eloquent models.

To get a multilanguage string use the get method.

Advanced usage

The MultiLanguageString class is a wrapper around an associative array that maps locale codes to string values. The class is aware of the current locale and fallback locale settings in Laravel, and it provides a convenient API for setting and retrieving multilanguage strings.

The MultiLanguageString class can be used independently of Eloquent models.

Locale handling

The MultiLanguageString class is aware of the current locale and fallback locale settings in Laravel. By default, the class uses the current locale to get the value of a multilanguage string. If the value is not set for the current locale, the class will use the fallback locale to get the value. You can enable or disable the fallback locale for a specific instance of the MultiLanguageString class.


(c) 2025 Wouter de Jong


All versions of laravel-multi-language-strings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^10.0||^11.0||^12.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 dejodev/laravel-multi-language-strings contains the following files

Loading the files please wait ....