Skip to content
Localize your Laravel application with a single global command
Branch: master
Clone or download
Latest commit b4f5159 Mar 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Put json files in the main lang directory Feb 26, 2019
.gitignore Initial commit Jun 27, 2018
LICENSE.md Initial commit Jun 27, 2018
README.md Update the gif Mar 20, 2019
composer.json Update symfony/console version constraint Aug 11, 2018
laravel-localize Fix autoload.php file path Aug 11, 2018

README.md

Laravel localize

laravel-localize

This package installs a global command that lets you easily install language files in your Laravel application.

The language files are downloaded from the awesome caouecs/Laravel-lang repository.

Installation

You can install the package globally via composer:

composer global require pawelmysior/laravel-localize

Make sure that the global composer's vendor/bin directory is in your system's $PATH.

Usage

Cd into your Laravel application and run this command:

laravel-localize LANG

where LANG is the code of the language you want to install. For example, to install German language files, run:

laravel-localize de

The command will install the following files:

  • resources/lang/de/auth.php
  • resources/lang/de/pagination.php
  • resources/lang/de/passwords.php
  • resources/lang/de/validation.php
  • resources/lang/de.json

Some other example languages:

# Install Dutch language files
laravel-localize nl

# Install Polish language files
laravel-localize pl

# Install Spanish language files
laravel-localize es

You can find the list of available languages here.

License

The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.