Download the PHP package yannxtrem/laralang without Composer

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

Laralang

Latest Stable Version License

Laravel Lang Extractor is a lightweight, zero-dependency development tool for Laravel 11 & 12.

It automatically scans your application's Views and Livewire components to find translatable strings (using the __('key') helper), deduplicates them, and exports them into a clean JSON file ready for translation.

It replaces complex Bash scripts or heavy dependencies when you just need a simple JSON extraction.

🚀 Features

📋 Requirements

📦 Installation

Install the package via Composer as a development dependency:

Note: Since this tool is used during development to generate translation files, it is recommended to install it with the --dev flag.

🛠 Usage

Basic Extraction

Run the artisan command to scan your project and generate the JSON file:

By default, this will create a file named a_trad.json in your project root.

Custom Output File

You can specify the output filename and path using the --output option:

Or for another language:

🔍 How it works

  1. Scan: The command looks for *.php and *.blade.php files in:
    • resources/views/
    • app/Livewire/
  2. Extract: It applies a regex pattern to find usage of the Laravel translation helper:
    • Matches: __('Hello World')
    • Matches: __("Hello World")
  3. Process:
    • Keys are sorted alphabetically.
    • Duplicates are removed.
  4. Save: The result is saved as a JSON object where the key is the string found, and the value is an empty string (or the existing translation if you implement merging logic in the future).

Example Output

⚡ Workflow Example

  1. Develop your features using __('My text') in Blade or PHP files.
  2. Run php artisan translation:extract --output=lang/fr.json.
  3. Open lang/fr.json and fill in the empty values with translations.
  4. Laravel automatically uses these translations when the locale is set to fr.

🤝 Contribution

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

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


All versions of laralang with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/console Version ^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 yannxtrem/laralang contains the following files

Loading the files please wait ...