return self::$__options;
}
+ /**
+ * @throws \JsonException
+ */
protected function _getOptions()
{
$locale = 'en';
--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+class ElearningTranslateCrudController extends \Cubist\Backpack\Magic\Controllers\CubistMagicController
+{
+ use \Cubist\Backpack\Magic\Operations\CreateOperation;
+ use \Cubist\Backpack\Http\Controllers\Operations\CloneEditOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
+ use \Cubist\Backpack\Http\Controllers\Operations\BulkPublishOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\CloneOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\BulkCloneOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\BulkDeleteOperation;
+ use \App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
+ use \App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
+
+
+
+ /*
+ __('traduction')
+ __('traductions')
+ */
+
+ protected $_modelNamespace = 'App\Models\ElearningTranslate';
+ protected $_routeURL = 'elearning-translate';
+ protected $_singular = 'traduction';
+ protected $_plural = 'traductions';
+ protected $_oneInstance= true;
+}
use \Backpack\CRUD\app\Http\Controllers\Operations\BulkCloneOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
use \Backpack\CRUD\app\Http\Controllers\Operations\BulkDeleteOperation;
- use \App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelExportOperation;
- use \App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelImportOperation;
-
+ use \App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
+ use \App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
+
/*
--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin\Operations\ContentTranslate;
+
+use App\Models\FluidbookTranslate;
+use Cubist\Util\Files\Files;
+use Illuminate\Support\Facades\Route;
+use PhpOffice\PhpSpreadsheet\Spreadsheet;
+use PhpOffice\PhpSpreadsheet\Style\Protection;
+use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
+
+// __('!! Traduction de l\'interface fluidbook')
+trait ExcelExportOperation
+{
+ protected function setupExcelExportRoutes($segment, $routeName, $controller)
+ {
+
+ Route::match(['get'], $segment . '/excel/export/{locale}', $controller . '@excelExport');
+ }
+
+ protected function excelExport($locale)
+ {
+ $class = get_class($this);
+
+ $alldata = json_decode($class::find(1)->getRawOriginal('content_translatable'), true);
+
+ $t = $class::find(1);
+ if ($locale === 'en') {
+ $ref = 'fr';
+ } else {
+ $ref = 'en';
+ }
+
+ $tref = $this->_getTranslations($alldata, $ref);
+ $tr = $this->_getTranslations($alldata, $locale);
+
+ $xls = new Spreadsheet();
+
+ $worksheet = $xls->getActiveSheet();
+ $worksheet->setTitle($locale);
+
+ $worksheet->getProtection()->setSheet(true);
+ $xls->getDefaultStyle()->getProtection()->setLocked(false);
+
+ $worksheet->setCellValueByColumnAndRow(1, 1, 'ID');
+ $worksheet->setCellValueByColumnAndRow(2, 1, 'Reference string');
+ $worksheet->setCellValueByColumnAndRow(3, 1, 'Reference translation');
+ $worksheet->setCellValueByColumnAndRow(4, 1, 'Translation');
+ for ($i = 2; $i <= 4; $i++) {
+ $style = $worksheet->getStyleByColumnAndRow($i, 1);
+ $style->getAlignment()->setWrapText(true);
+ $style->getFont()->setBold(true);
+ $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);
+ }
+
+ $row = 2;
+ foreach ($tref as $k => $v) {
+ $str = base64_decode(explode('t_', $k)[1]);
+ $worksheet->setCellValueByColumnAndRow(1, $row, $k);
+ $worksheet->setCellValueByColumnAndRow(2, $row, $str);
+ $worksheet->setCellValueByColumnAndRow(3, $row, $v);
+
+ for ($i = 1; $i <= 3; $i++) {
+ $style = $worksheet->getStyleByColumnAndRow($i, $row);
+ $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);
+ }
+ for ($i = 2; $i <= 4; $i++) {
+ $style = $worksheet->getStyleByColumnAndRow($i, $row);
+ $style->getAlignment()->setWrapText(true);
+ }
+ $worksheet->setCellValueByColumnAndRow(4, $row, $tr[$k] ?? '');
+ $row++;
+ }
+
+ $width = 100;
+ $worksheet->getColumnDimensionByColumn(1)->setVisible(false);
+ $worksheet->getColumnDimensionByColumn(2)->setWidth($width);
+ $worksheet->getColumnDimensionByColumn(3)->setWidth($width);
+ $worksheet->getColumnDimensionByColumn(4)->setWidth($width);
+
+ $writer = new Xlsx($xls);
+ $tmp = Files::tempnam();
+ $writer->save($tmp);
+
+ return response()->download($tmp, $class::getName() . '_translate_' . $locale . '.xlsx')->deleteFileAfterSend();
+ }
+
+ protected function _getTranslations($alldata, $locale)
+ {
+ if (isset($alldata[$locale])) {
+ $data = $alldata[$locale];
+ } else {
+ $e = explode('_', $locale);
+ if (isset($alldata[$e[0]])) {
+ $data = $alldata[$e[0]];
+ } else {
+ $data = $alldata['en'];
+ }
+ }
+ $res = [];
+ foreach ($data as $k => $v) {
+ if ($k === 'k') {
+ continue;
+ }
+ $res[$k] = $v;
+ }
+ return $res;
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin\Operations\ContentTranslate;
+
+use App\Models\FluidbookTranslate;
+use App\Models\Quiz;
+use App\Models\QuizTranslation;
+use Cubist\Util\Files\Files;
+use Illuminate\Support\Facades\Route;
+use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
+use PhpOffice\PhpSpreadsheet\RichText\RichText;
+use Prologue\Alerts\Facades\Alert;
+// __('!! Traduction de l\'interface fluidbook')
+trait ExcelImportOperation
+{
+ protected function setupExcelImportRoutes($segment, $routeName, $controller)
+ {
+ Route::match(['post'], $segment . '/excel/import/{locale}', $controller . '@excelImport');
+ }
+
+ /**
+ * @throws \JsonException
+ */
+ protected function excelImport($locale)
+ {
+ $file = $_FILES['file'];
+
+ if ($file['error']) {
+ Alert::warning('No file were imported')->flash();
+ return;
+ }
+
+ $reader = new Xlsx();
+ $xls = $reader->load($file['tmp_name']);
+ $sheet = $xls->getActiveSheet();
+
+ $existingTranslation = FluidbookTranslate::getFluidbookTranslation($locale);
+
+
+ $translations = [];
+ $count = 0;
+ $updated = 0;
+ foreach ($sheet->getRowIterator(2) as $row) {
+ $ri = $row->getRowIndex();
+ $k = $sheet->getCellByColumnAndRow(1, $ri)->getValue();
+ if (!FluidbookTranslate::isKey($k)) {
+ continue;
+ }
+
+ $v = $sheet->getCellByColumnAndRow(4, $ri)->getValue();
+ if($v instanceof RichText){
+ $v=$v->getPlainText();
+ }
+
+ if (!isset($existingTranslation[$k]['translation']) || $v != $existingTranslation[$k]['translation']) {
+ $translations[$k] = $v;
+ $updated++;
+ }
+ $count++;
+ }
+
+
+ if (!$count) {
+ Alert::warning('No translation were find')->flash();
+ } elseif (!$updated) {
+ Alert::warning('No translation were updated')->flash();
+ } else {
+ FluidbookTranslate::updateFluidbookTranslation($locale, $translations);
+ Alert::success('<b>' . $updated . ' translations</b> were updated (' . $count . ' total)')->flash();
+ }
+ return redirect($this->crud->route . '/1/edit/?locale=' . $locale);
+ }
+}
+++ /dev/null
-<?php
-
-namespace App\Http\Controllers\Admin\Operations\FluidbookTranslate;
-
-use App\Models\FluidbookTranslate;
-use Cubist\Util\Files\Files;
-use Illuminate\Support\Facades\Route;
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
-use PhpOffice\PhpSpreadsheet\Style\Protection;
-use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
-// __('!! Traduction de l\'interface fluidbook')
-trait ExcelExportOperation
-{
- protected function setupExcelExportRoutes($segment, $routeName, $controller)
- {
-
- Route::match(['get'], $segment . '/excel/export/{locale}', $controller . '@excelExport');
- }
-
- protected function excelExport($locale)
- {
- $alldata = json_decode(FluidbookTranslate::find(1)->getRawOriginal('content_translatable'), true);
-
- $t = FluidbookTranslate::find(1);
- if ($locale === 'en') {
- $ref = 'fr';
- } else {
- $ref = 'en';
- }
-
- $tref = $this->_getTranslations($alldata, $ref);
- $tr = $this->_getTranslations($alldata, $locale);
-
- $xls = new Spreadsheet();
-
- $worksheet = $xls->getActiveSheet();
- $worksheet->setTitle($locale);
-
- $worksheet->getProtection()->setSheet(true);
- $xls->getDefaultStyle()->getProtection()->setLocked(false);
-
- $worksheet->setCellValueByColumnAndRow(1, 1, 'ID');
- $worksheet->setCellValueByColumnAndRow(2, 1, 'Reference string');
- $worksheet->setCellValueByColumnAndRow(3, 1, 'Reference translation');
- $worksheet->setCellValueByColumnAndRow(4, 1, 'Translation');
- for ($i = 2; $i <= 4; $i++) {
- $style = $worksheet->getStyleByColumnAndRow($i, 1);
- $style->getAlignment()->setWrapText(true);
- $style->getFont()->setBold(true);
- $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);
- }
-
- $row = 2;
- foreach ($tref as $k => $v) {
- $str = base64_decode(explode('t_', $k)[1]);
- $worksheet->setCellValueByColumnAndRow(1, $row, $k);
- $worksheet->setCellValueByColumnAndRow(2, $row, $str);
- $worksheet->setCellValueByColumnAndRow(3, $row, $v);
-
- for ($i = 1; $i <= 3; $i++) {
- $style = $worksheet->getStyleByColumnAndRow($i, $row);
- $style->getProtection()->setLocked(Protection::PROTECTION_PROTECTED);
- }
- for ($i = 2; $i <= 4; $i++) {
- $style = $worksheet->getStyleByColumnAndRow($i, $row);
- $style->getAlignment()->setWrapText(true);
- }
- $worksheet->setCellValueByColumnAndRow(4, $row, $tr[$k] ?? '');
- $row++;
- }
-
- $width = 100;
- $worksheet->getColumnDimensionByColumn(1)->setVisible(false);
- $worksheet->getColumnDimensionByColumn(2)->setWidth($width);
- $worksheet->getColumnDimensionByColumn(3)->setWidth($width);
- $worksheet->getColumnDimensionByColumn(4)->setWidth($width);
-
- $writer = new Xlsx($xls);
- $tmp = Files::tempnam();
- $writer->save($tmp);
-
- return response()->download($tmp, 'fluidbook_translate_' . $locale . '.xlsx')->deleteFileAfterSend();
- }
-
- protected function _getTranslations($alldata, $locale)
- {
- if (isset($alldata[$locale])) {
- $data = $alldata[$locale];
- } else {
- $e = explode('_', $locale);
- if (isset($alldata[$e[0]])) {
- $data = $alldata[$e[0]];
- } else {
- $data = $alldata['en'];
- }
- }
- $res = [];
- foreach ($data as $k => $v) {
- if ($k === 'k') {
- continue;
- }
- $res[$k] = $v;
- }
- return $res;
- }
-}
+++ /dev/null
-<?php
-
-namespace App\Http\Controllers\Admin\Operations\FluidbookTranslate;
-
-use App\Models\FluidbookTranslate;
-use App\Models\Quiz;
-use App\Models\QuizTranslation;
-use Cubist\Util\Files\Files;
-use Illuminate\Support\Facades\Route;
-use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
-use PhpOffice\PhpSpreadsheet\RichText\RichText;
-use Prologue\Alerts\Facades\Alert;
-// __('!! Traduction de l\'interface fluidbook')
-trait ExcelImportOperation
-{
- protected function setupExcelImportRoutes($segment, $routeName, $controller)
- {
- Route::match(['post'], $segment . '/excel/import/{locale}', $controller . '@excelImport');
- }
-
- /**
- * @throws \JsonException
- */
- protected function excelImport($locale)
- {
- $file = $_FILES['file'];
-
- if ($file['error']) {
- Alert::warning('No file were imported')->flash();
- return;
- }
-
- $reader = new Xlsx();
- $xls = $reader->load($file['tmp_name']);
- $sheet = $xls->getActiveSheet();
-
- $existingTranslation = FluidbookTranslate::getFluidbookTranslation($locale);
-
-
- $translations = [];
- $count = 0;
- $updated = 0;
- foreach ($sheet->getRowIterator(2) as $row) {
- $ri = $row->getRowIndex();
- $k = $sheet->getCellByColumnAndRow(1, $ri)->getValue();
- if (!FluidbookTranslate::isKey($k)) {
- continue;
- }
-
- $v = $sheet->getCellByColumnAndRow(4, $ri)->getValue();
- if($v instanceof RichText){
- $v=$v->getPlainText();
- }
-
- if (!isset($existingTranslation[$k]['translation']) || $v != $existingTranslation[$k]['translation']) {
- $translations[$k] = $v;
- $updated++;
- }
- $count++;
- }
-
-
- if (!$count) {
- Alert::warning('No translation were find')->flash();
- } elseif (!$updated) {
- Alert::warning('No translation were updated')->flash();
- } else {
- FluidbookTranslate::updateFluidbookTranslation($locale, $translations);
- Alert::success('<b>' . $updated . ' translations</b> were updated (' . $count . ' total)')->flash();
- }
- return redirect($this->crud->route . '/1/edit/?locale=' . $locale);
- }
-}
--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+class TranslateCrudController extends \Cubist\Backpack\Magic\Controllers\CubistMagicController
+{
+ use \Cubist\Backpack\Magic\Operations\CreateOperation;
+ use \Cubist\Backpack\Http\Controllers\Operations\CloneEditOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
+ use \Cubist\Backpack\Http\Controllers\Operations\BulkPublishOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\CloneOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\BulkCloneOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
+ use \Backpack\CRUD\app\Http\Controllers\Operations\BulkDeleteOperation;
+ use \Cubist\Backpack\Http\Controllers\Operations\ReviseOperation;
+
+
+
+ /*
+ __('traduction')
+ __('traductions')
+ */
+
+ protected $_modelNamespace = 'App\Models\Base\ToolboxContentTranslate';
+ protected $_routeURL = 'translate';
+ protected $_singular = 'traduction';
+ protected $_plural = 'traductions';
+ protected $_oneInstance= true;
+}
namespace App\Models\Base;
-use App\Models\ElearningTranslate;
-use App\Models\FluidbookTranslate;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
+use Cubist\Backpack\Facades\App;
use Cubist\Backpack\Magic\Models\Translate;
+use Cubist\Util\PHP;
use Illuminate\Support\Facades\Cache;
class ToolboxContentTranslate extends Translate
protected static $_allTranslations = null;
- protected static $_name = 'content';
+ protected static string $_name = 'content';
+
+ protected $_operations = [ExcelExportOperation::class, ExcelImportOperation::class];
+
+ public function __construct(array $attributes = [])
+ {
+ PHP::neverStop();
+
+ $this->_availableLocales = \Cubist\Locale\Locale::getList(App::getLocale());
+ $this->addEditAction('content_translate.excel_export');
+ $this->addEditAction('content_translate.excel_import');
+
+ parent::__construct($attributes);
+ }
+
+ public static function getName()
+ {
+ return static::$_name;
+ }
protected function _getLanguageFile($locale)
{
- return self::getLanguageFile($locale);
+ return static::getLanguageFile($locale);
}
public static function getLanguageFile($locale)
});
}
- return self::$_allTranslations;
+ return static::$_allTranslations;
}
public static function getCompiledTranslations()
{
- $raw = self::getAllTranslations();
+ $raw = static::getAllTranslations();
$res = [];
foreach ($raw as $code => $data) {
$res[$code] = [];
/**
* @param string $locale
* @return array[]|null
- * @throws \JsonException
*/
- public static function getTranslation($locale)
+ public static function getLocaleTranslations($locale)
{
- $all = static::getAllTranslations();
- $res = $all[$locale] ?? null;
- return $res;
+ $all = static::getAllTranslations(false);
+ return $all[$locale] ?? [];
}
}
namespace App\Models;
-use App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelExportOperation;
-use App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelImportOperation;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
use App\Models\Base\ToolboxContentTranslate;
use App\Models\Traits\QuizBranches;
use Cubist\Backpack\Facades\App;
use QuizBranches;
protected $table = 'elearning_translate';
- protected static $_name='elearning';
+ protected static string $_name='elearning';
protected $_enableRevisions = false;
protected $_operations = [ExcelExportOperation::class, ExcelImportOperation::class];
- public function __construct(array $attributes = [])
- {
- PHP::neverStop();
-
- $this->_availableLocales = \Cubist\Locale\Locale::getList(App::getLocale());
- $this->addEditAction('elearning_translate.excel_export');
- $this->addEditAction('elearning_translate.excel_import');
-
- parent::__construct($attributes);
- }
-
public function getPaths()
{
$res = [];
namespace App\Models;
use App\Fields\NSISLocale;
-use App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelExportOperation;
-use App\Http\Controllers\Admin\Operations\FluidbookTranslate\ExcelImportOperation;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
+use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
use App\Models\Base\ToolboxContentTranslate;
use App\Models\Traits\FluidbookPlayerBranches;
use Cubist\Backpack\Facades\App;
use FluidbookPlayerBranches;
protected $table = 'fluidbook_translate';
- protected static $_name = 'elearning';
+ protected static string $_name = 'elearning';
protected static $_allTranslations = null;
'plural' => 'traductions',
'oneinstance' => true];
- protected $_operations = [ExcelExportOperation::class, ExcelImportOperation::class];
-
-
- public function __construct(array $attributes = [])
- {
- PHP::neverStop();
-
- $this->_availableLocales = \Cubist\Locale\Locale::getList(App::getLocale());
- $this->addEditAction('fluidbook_translate.excel_export');
- $this->addEditAction('fluidbook_translate.excel_import');
-
- parent::__construct($attributes);
- }
-
public function setFields()
{
$this->addField(['name' => 'nsis', 'type' => NSISLocale::class, 'label' => __('Langue de l\'installeur') . ' (' . __('Version offline windows') . ')', 'translatable' => true, 'default' => 'English']);
{
return static::getAllTranslations($force);
}
-
+
/**
* @param string $locale
* @return array[]|null
*/
public static function getFluidbookTranslation($locale)
{
- return static::getTranslation($locale);
+ return static::getLocaleTranslations($locale);
}
}
--- /dev/null
+{{-- __('!! Traduction des fluidbooks') --}}
+<a href="{{$crud->route}}/excel/export/{{request()->get('locale',app()->getLocale())}}"
+ class="btn btn-outline-notice"><span
+ class="la la-file-excel"></span> {{__('Export Excel')}}</a>
+
--- /dev/null
+{{-- __('!! Traduction des fluidbooks') --}}
+@push("after_form")
+<form method="post" style="visibility: hidden;width: 0;height: 0;" enctype="multipart/form-data" action="{{$crud->route}}/excel/import/{{request()->get('locale',app()->getLocale())}}"
+ style="visibility:hidden;height:1px;position:absolute;top:0;" id="uploadimportform">
+ @csrf
+ <input type="file" name="file" id="uploadimport"
+ accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
+</form>
+@endpush
+
+<button class="btn btn-outline-notice" id="uploadimportbutton"><span
+ class="la la-file-excel"></span> {{__('Import Excel')}}</button>
+
+@push('after_scripts')
+ <script>
+ (function ($) {
+ $(function () {
+ $(document).on('click', "#uploadimportbutton", function () {
+ $("#uploadimport").click();
+ return false;
+ });
+
+ $(document).on('change', '#uploadimportform', function () {
+ $("#uploadimportform").submit();
+ })
+ });
+ })(jQuery);
+ </script>
+@endpush
+++ /dev/null
-{{-- __('!! Traduction des fluidbooks') --}}
-<a href="{{$crud->route}}/excel/export/{{request()->get('locale',app()->getLocale())}}"
- class="btn btn-outline-notice"><span
- class="la la-file-excel"></span> {{__('Export Excel')}}</a>
-
+++ /dev/null
-{{-- __('!! Traduction des fluidbooks') --}}
-@push("after_form")
-<form method="post" style="visibility: hidden;width: 0;height: 0;" enctype="multipart/form-data" action="{{$crud->route}}/excel/import/{{request()->get('locale',app()->getLocale())}}"
- style="visibility:hidden;height:1px;position:absolute;top:0;" id="uploadimportform">
- @csrf
- <input type="file" name="file" id="uploadimport"
- accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
-</form>
-@endpush
-
-<button class="btn btn-outline-notice" id="uploadimportbutton"><span
- class="la la-file-excel"></span> {{__('Import Excel')}}</button>
-
-@push('after_scripts')
- <script>
- (function ($) {
- $(function () {
- $(document).on('click', "#uploadimportbutton", function () {
- $("#uploadimport").click();
- return false;
- });
-
- $(document).on('change', '#uploadimportform', function () {
- $("#uploadimportform").submit();
- })
- });
- })(jQuery);
- </script>
-@endpush
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('quiz-theme') }}"><i
class="la la-palette nav-icon"></i> {{__('Thèmes')}}</a></li>
@endcan
- @can('quiztranslation:read')
- <li class="nav-item"><a class="nav-link" href="{{ backpack_url('quiztranslation') }}"><i
- class="la la-language nav-icon"></i> {{__('Traductions')}}</a></li>
- @endcan
+
<li class="nav-divider"></li>
@can('elearning-media:read')
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('elearning-media') }}"><i
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('elearning-package') }}"><i
class="la la-cubes nav-icon"></i> {{__('Package')}}</a></li>
@endcan
-
+ @can('quiztranslation:read')
+ <li class="nav-item"><a class="nav-link" href="{{ backpack_url('elearning-translate') }}"><i
+ class="la la-language nav-icon"></i> {{__('Traductions')}}</a></li>
+ @endcan
</ul>
</li>
@endcanany