Download the PHP package adampatterson/laravel-csv-translations without Composer

On this page you can find all versions of the php package adampatterson/laravel-csv-translations. 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-csv-translations

Laravel CSV Translations

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package allows you to export and import Laravel translations using CSV files. This makes it easy to share translations with non-technical team members or external translation services.

It supports both standard Laravel language files and vendor-published translations, and can handle both PHP array and JSON formats.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Usage

Publishing Translations

By default, the Laravel application skeleton does not include the lang directory. If you would like to customize Laravel's language files, you may publish them via the lang:publish Artisan command.

Further, you can also publish translations from any vendor package that has published its translations. To do this, use the --vendor (or -v) option with the package name:

For example, Filament's translations can be published with:

Exporting Translations

To export your translations to a CSV file, use the translation:export command:

By default, this exports the base locale (defined in config('app.locale')) to the path specified in your config.

Options

The CSV will contain the following columns:

  1. Path: The relative path to the translation file (e.g., en/auth or vendor/package/en/messages).
  2. Key: The dot-notation key for the translation.
  3. Original: The current translation value.
  4. New: An empty column for you to provide new translations.

Importing Translations

To import translations from a CSV file, use the translation:import command:

The command will read the CSV and update your language files. If a value is present in the New column, it will be used; otherwise, the Original value is preserved.

Options

Testing

Changelog

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

Credits


All versions of laravel-csv-translations with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
spatie/laravel-package-tools Version ^1.16
illuminate/contracts 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 adampatterson/laravel-csv-translations contains the following files

Loading the files please wait ...