Download the PHP package subotkevic/laravel-json-translation-helper without Composer

On this page you can find all versions of the php package subotkevic/laravel-json-translation-helper. 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-json-translation-helper

Total Downloads Latest Stable Version License

JSON Translation Helper for Laravel

JSON Translation Helper scans your project for __(), lang() translation helper methods and @lang directives, then it creates keys in your JSON translation files.

And yes, it avoids duplicates – helper creates only non-existing keys. Ready for your translation.

Installation

First, install JSON Translation Helper using the Composer require command:

That's it. Package registers service provider automatically.

Usage

Translation files

First, you have to create your translation files for languages you will translate your application to.

For example, if you want your application to have a Spanish translation, you should create a resources/lang/es.json file.

Of course you can have multiple translation files:

Make sure that your translation files is valid JSON, otherwise our package will not work:

If you don't have any translations for now, just make sure your file is not empty, but actually an empty JSON object:

Scan your application

Finally, to scan your application for missing translation keys just run:

Configuration

Publishing configuration

First, publish the configuration file:

It will bring you config/translation-helper.php configuration file.

Read the following sections of what you can configure.

Directories

To specify where you want to scan for translation strings, just modify scan_directories array:

File extensions

Our package scans only .php files out of the box.

You can add more file extensions to file_extensions array in the config/translation-helper.php configuration file to scan, let's say, .vue or .js files:

Translation helper methods

By default our package looks for lang() and __() translation helper methods and directives.

But you can extend, modify, or remove them in the config file by modifying translation_methods array:


All versions of laravel-json-translation-helper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
laravel/framework Version >=5.4.x-dev
ext-json Version *
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 subotkevic/laravel-json-translation-helper contains the following files

Loading the files please wait ....