Download the PHP package stevegrunwell/lost-in-translation without Composer

On this page you can find all versions of the php package stevegrunwell/lost-in-translation. 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 lost-in-translation

Lost in Translation

Build Status Coverage Status

Lost in Translation is designed to help developers locate instances of localization strings within a Laravel application that haven't been provided translations.

Installation

Lost in Translation can be installed into your Laravel project via Composer:

By default, this will replace the default TranslationServiceProvider class with a sub-class that adds additional logic when a translation isn't found. To resume default behavior (even in a production environment), see the "Configuration" section below.

Configuration

By default, Lost in Translation will catch missing translations in two ways:

  1. In environments where APP_DEBUG is true, a LostInTranslation\MissingTranslationException will be found if the application attempts to load a translation that hasn't been defined.
  2. Missing translations will be written to storage/logs/lost-in-translation.log.

Either of these can be disabled via the package's configuration, making Lost in Translation safe to use in production. These values can be set using the following environment variables:

TRANS_LOG_MISSING
Determines whether or not missing translations should be logged. Default is "true".
TRANS_ERROR_ON_MISSING
Should MissingTranslationException exceptions be thrown when a translation is missing? Default is "false".

To override package configuration, run the following to copy the configuration to your app's config/ directory:

This will create a new file in config/lostintranslation.php, where default values for your application can be set.

Extending

When a missing translation is found, the a LostInTranslation\MissingTranslationFound event will be dispatched. This event makes it easy to do something (send an email, open a GitHub issue, etc.)when a missing translation is encountered.

First, create a new event listener in your application; in this example, we're using app/Listeners/NotifyOfMissingTranslation.php:

The MissingTranslationFound event has four public properties of note:

  1. $key - The translation key that was not found.
  2. $replacements - Any replacements that were passed to the translation call.
  3. $locale - The locale that was being used.
  4. $fallback - The fallback locale, if defined.

Then, in app/Providers/EventServiceProvider.php, add the following to register NotifyOfMissingTranslation as a callback when a MissingTranslationFound event occurs:

For more on event listeners, please see the Laravel Events documentation.


All versions of lost-in-translation with dependencies

PHP Build Version
Package Version
No informations.
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 stevegrunwell/lost-in-translation contains the following files

Loading the files please wait ....