Download the PHP package bernardomacedo/laravel-db-translator without Composer

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

Laravel Database Translator

Total Downloads Latest Stable Version Latest Unstable Version License Build Status

This package allows you to add translations to database and generates the localization folders per group.

Note:

Compatibility

Laravel Framework 5.6

Install

First register the service provider and facade in your application.

To publish all settings...

...or individually:

And run migrations

Add a disk to the filesystems.php filestorage:

If you change the default disk name, because it might conflict with another package or with a potential future one, be sure to change it under the published db-translator.php => storage_driver` parameter.

Usage

Default language set to App::getLocale().

In a blade template use:

This translation method is easier to interpret because even if the translation is not found, the text you input will be returned.

What groups are for?

Sometimes you need to generate a specific translation for a context based situation. Where the same phrase or text you wish to translate, means something different in other languages. So, the group parameter allows you to differentiate the same translation to be translated differently depending on context.

Dynamic groups and variables

When using dynamic variables for translation, be sure to force a group named 'dynamic_...'

Translating a text

DBTranslator will try to find the $variable_id and the $language_id for you if you only supply strings.

Sometimes you wish to create a variable for translating, adding a translation directly on a language you choose. So, supplying a string on $variable_id that does not exist on the translations_variables table, will generate a new one, adding an entry to the translations_translated table directly.

Generating the translation files

on a controller class

This will create all required files under the directory supplied on the filesystems.php file.

Getting all variables on database

Getting available translations

Inserting / Removing translations into/from database without rendering views in the browser

You can add translations to database without rendering a view. For this you can run a artisan command and Laravel Database Translator will check your view folders configured under config/view.php config file paths and will add any element of lang(*) found to the database.

Inserting translations

Removing unused translations

When running these commands, Dynamic groups and `$variables will be ignored. eg:

Generating translations

Generates for Portuguese

Generates for Spanish

Generates all languages

Generates active languages

Generates inactive languages

License

The Laravel Database Translator is open-sourced software licensed under the MIT license


All versions of laravel-db-translator with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 5.6.x
illuminate/translation Version 5.6.x
illuminate/database Version 5.6.x
illuminate/console Version 5.6.x
illuminate/filesystem Version 5.6.x
illuminate/config Version 5.6.x
illuminate/routing Version 5.6.x
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 bernardomacedo/laravel-db-translator contains the following files

Loading the files please wait ....