Download the PHP package glebsky/laravel-lang-generator without Composer

On this page you can find all versions of the php package glebsky/laravel-lang-generator. 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-lang-generator

Laravel Lang Generator

Laravel Lang Generator

Build Status StyleCI Travis Latest Stable Version PHP Version Tags Last tag Downloads

Searches for multilingual phrases in a Laravel project and automatically generates language files for you. You can search for new translation keys, delete unused keys, and quickly generate new language files.


Installation

You can start the installation through the composer using the command.

You can also select the required version to support older versions of Laravel

Configuration

To create configuration file of this package you can use command:

It will create configuration file in app/config with name lang-generator

About configuration

file_type: is responsible for the type of the generated file. It is possible to generate both a json and a php array files. Possible values: array , json


file_name: is responsible for the name of the generated files. By default, it is lang.


languages: is responsible for the generated languages and accepts an array. Language folders with the specified data will be created. By default, it just en.


Usage

Main Command

This command starts searching for translation keys in the resource/views and app folders according to the basic settings. Existing keys will not be removed, only new ones will be added.

it will create new language files with found translation keys. By default, name of lang file is lang

title title

Parameters

In addition, the command accepts several parameters that allow you to flexibly manage the package.

About parameters

--type= or -T:

is responsible for the type of the generated file. It is possible to generate both a json and a php array files. Possible values: array , json.
Example: php artisan lang:generate --type=json


--name= or -N:

is responsible for the name of the generated files. By default, it is lang.

Example: php artisan lang:generate --name="pagination"


--langs= or -L:

is responsible for the generated languages and accepts an array. Language folders with the specified data will be created. By default, it just en.
Example: php artisan lang:generate --langs="en" --langs="es"


--sync or -S:

If you specify this flag, then all unused already existing translation keys will be deleted.
Example: php artisan lang:generate --sync


--clear or -C:

If you specify this flag, existing language files are removed and new ones are created. All existing translations will be removed.

NOTE! That NOT all language files are deleted, but only with the name specified in the settings.

Example: php artisan lang:generate --clear


--append or -A:

If you specify this flag, new translations found will be added at the end of the JSON file, which might be useful for automation or version control. Only usable with JSON as type.

Example: php artisan lang:generate --type=json --append

Notes

lang:generate will update your language files by writing them completely, meaning that any comments or special styling will be removed, so I recommend you backup your files.


All versions of laravel-lang-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.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 glebsky/laravel-lang-generator contains the following files

Loading the files please wait ....