Configuration

To publish the config file run:

php artisan vendor:publish --tag=languages-config

  

This will copy the file (languages.php) in the Laravel /config directory.

Route

In the route configuration it is possible to change the URL path. The values must be valid URL paths and of course have to be unique in the router list.

'prefix' => 'translator',
'languages_url' => 'languages',
'translations_url' => 'translations',
'translators_url' => 'translators',
'login_url' => 'login'

Tables

The table configuration allows to change the table names before migrating the tables. If the names are changed after migrating, then it will be necessary to change the names of the tables in the DB.

'table_languages' => 'languages',
'table_translations' => 'translations',
'table_translators' => 'translators',
'table_translator_language' => 'translator_language'

Queue

Laravel Languages uses queues and batches. They have the same unique names through the package. It is possible to change the names, if they do clash with any other queue or batch in the app. The system prunes also cancelled or finished batches after 24 hours -> The value (prune_batch_hours) is in hours and can be changed. Don't forget running the scheduler!

'queue_name' => 'languageProcessor',
'batch_name' => 'languageBatch',
'prune_batch_hours' => 24,

Guard Translator

The UI has it's own guard (languages_translator), which has the translators as provider and can be renamed.

'translator_guard' => 'languages_translator'