Package Data | |
---|---|
Maintainer Username: | xdroidteam |
Maintainer Contact: | info@xdroid.com (Xdroid KFT.) |
Package Create Date: | 2016-10-06 |
Package Last Update: | 2024-03-07 |
Home Page: | |
Language: | HTML |
License: | MIT |
Last Refreshed: | 2024-11-19 03:14:00 |
Package Statistics | |
---|---|
Total Downloads: | 2,593 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Require this package in your composer.json and run composer update:
"xdroidteam/translation": "1.3.*"
or run
composer require xdroidteam/translation
directly.
You can change the route prefix in the deployed config file config/xdroidteam-translation.php
. Also you can modify the middleware or exclude translation groups (excluded groups will not appear on the GUI). See the example below.
<?php
return array(
'route' => [
'prefix' => 'custom-translations-route',
'middleware' => [
'web',
'auth',
'custom middleware',
],
],
'exclude_groups' => ['auth', 'base'],
'translation_model' => '\App\Models\Translation',
);
You can use other Translation model, to overwrite methods. For example:
<?php
namespace App\Models;
use XdroidTeam\Translation\Translation as XdroidTranslation;
class Translation extends XdroidTranslation
{
public static function getLanguages(){
// original:
// return explode(',', env('LANGUAGES'));
//custom:
return ['en', 'hu'];
}
}
You can export your db to a .CSV file, with call this function:
XdroidTeam\Translation::exportToCSV('path/to/file');