Download the PHP package casa-parks/extract-translations without Composer

On this page you can find all versions of the php package casa-parks/extract-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 extract-translations

Build Status Total Downloads Latest Stable Version License

Introduction

Extract Translations is a simple provision of translation listing, designed for providing use to the front end (IE: in JavaScript).

License

Extract Translations is open-sourced software licensed under the MIT license

Installation

To get started with Extract Translations, use Composer to add the package to your project's dependencies:

composer require casa-parks/extract-translations

Configuration

After installing, register the CasaParks\ExtractTranslations\ExtractTranslationsServiceProvider in your config/app.php configuration file:

Basic Usage

Create a simple view composer, like so:

Add this view composer, into your app (or composer) service provider's boot method:

In your common layout template file:

Then utilise as required in your JavaScript.

Advanced Usage

Personally, I wouldn't want all of this work to occur on every page load. What I would do is have a translation api (we know that if the translations are going to be used on the front end then the user definitely has JavaScript enabled anyway, right?).

I'd have a simple API controller, like so:

A simple API route (in routes/api.php or your equivalent):

Then in your front end (IE, with axios):

Bonus Usage

You can even do this on a per-language basis, as a hot-swap, something like:


All versions of extract-translations with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/contracts Version ^5.4
illuminate/support Version ^5.4
illuminate/translation Version ^5.4
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 casa-parks/extract-translations contains the following files

Loading the files please wait ....