Feature: Adding Translation Service and Translation Seeder
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Lunar\Models\Language;
|
||||
|
||||
class LanguageCreated
|
||||
{
|
||||
public function __construct(
|
||||
public readonly Language $language,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Lunar\Models\Language;
|
||||
|
||||
class LanguageDeleted
|
||||
{
|
||||
public function __construct(
|
||||
public readonly Language $language,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Lunar\Models\Language;
|
||||
|
||||
class LanguageUpdated
|
||||
{
|
||||
/**
|
||||
* @param array{code: string} $old Snapshot of watched attributes before the update.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly Language $language,
|
||||
public readonly array $old,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Spatie\TranslationLoader\LanguageLine;
|
||||
|
||||
class TranslationCreated
|
||||
{
|
||||
public function __construct(
|
||||
public readonly LanguageLine $languageLine,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Spatie\TranslationLoader\LanguageLine;
|
||||
|
||||
class TranslationDeleted
|
||||
{
|
||||
public function __construct(
|
||||
public readonly LanguageLine $languageLine,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Localization\Events;
|
||||
|
||||
use Spatie\TranslationLoader\LanguageLine;
|
||||
|
||||
class TranslationUpdated
|
||||
{
|
||||
/**
|
||||
* @param array{group: string, key: string, text: array} $old Snapshot before the update.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly LanguageLine $languageLine,
|
||||
public readonly array $old,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user