Download the PHP package zash/laravel-translations-db without Composer

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

Localization from a database

This package was created, as an in-place replacement for the default TranslationServiceProvider and mend for everyone who got tired of collecting translations in language files and maintaining dozens of arrays, filled with lots and lots of keys. Keys will be added to the database automatically, so no more hussling with adding your keys to the translations file. You'll never forget to translate a key anymore! In production your keys will be cached to ensure the localization stays fast!

Installation

Require this package with composer:

Like to live on the edge? Use:

After updating composer, we'll have to replace the TranslationServiceProvider the our ServiceProvider in config/app.php.

Find:

and Replace this with:

The ServiceProvider will now be loaded. To use this package properly you'll also need the create a table in your database, this can be achieved by publishing the config and migration of this package.

Run the following command:

and afterwards run your migrations:

And that's all there is to it!

Usage

You can just start using translations as you would normaly do with the Laravels default package. The functions and can be used as you normaly would.

For more information about Localization and the usage of these functions, please refer to the Documentation on the mather.

Files are still possible

The usage of translation files is however still possible. Every translation prefixed by a namespace is parsed through the old TranslationServiceProvider. This is needed for external packages that come with there own translation files. But in general you shouldn't be bothered by this.

Importing and exporting

To ease the proces of migrating to translations in the database, two commands are available since version 0.3.

Import

To import all translations out of your current language files, you can use the command:

This will import all available translations in language files into the database.

To import just some specifics you can also make use of the options and .

Export

To dump the translations from your database back to your filesystem, use:

The options and are also available for this command. Caution: all current files will be overwritten, so use with care!


All versions of laravel-translations-db with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/translation Version 5.*
illuminate/database Version 5.*
illuminate/cache Version 5.*
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 zash/laravel-translations-db contains the following files

Loading the files please wait ....