You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Filament Translatable
2
2
3
-
[](https://packagist.org/packages/filamerce/filament-translatable)
[](https://packagist.org/packages/webard/filament-translatable)
@@ -17,7 +17,7 @@ Filament Translatable is a set of tools that help manage translations.
17
17
You can install the package via composer:
18
18
19
19
```bash
20
-
composer require filamerce/filament-translatable
20
+
composer require webard/filament-translatable
21
21
```
22
22
23
23
Publish the assets:
@@ -37,12 +37,12 @@ The package from [Spatie](https://github.com/spatie/laravel-translatable) is the
37
37
38
38
The package from [Astrotomic](https://github.com/astrotomic/laravel-translatable) is an alternative supported way of handling translations.
39
39
40
-
Follow the [instructions](https://docs.astrotomic.info/laravel-translatable/installation#models) to properly configure your models, but instead of using the `Translatable` trait from the Astrotomic package, please use `Filamerce\FilamentTranslatable\Traits\AstrotomicTranslatable`.
40
+
Follow the [instructions](https://docs.astrotomic.info/laravel-translatable/installation#models) to properly configure your models, but instead of using the `Translatable` trait from the Astrotomic package, please use `Webard\FilamentTranslatable\Traits\AstrotomicTranslatable`.
41
41
42
42
If you use the Astrotomic package, please configure the plugin to work in Astrotomic mode:
43
43
44
44
```php
45
-
use Filamerce\FilamentTranslatable\Enums\TranslationMode;
45
+
use Webard\FilamentTranslatable\Enums\TranslationMode;
46
46
47
47
FilamentTranslatablePlugin::make()
48
48
->translationMode(TranslationMode::Astrotomic)
@@ -66,7 +66,7 @@ Or per field:
66
66
## Setup
67
67
68
68
```php
69
-
use Filamerce\FilamentTranslatable\FilamentTranslatablePlugin;
69
+
use Webard\FilamentTranslatable\FilamentTranslatablePlugin;
> Be sure to set field-specific methods like `required()` or `requiredDefaultLocale()`**before** calling the `translatable()` method.
@@ -216,15 +216,15 @@ TextInput::make('price')
216
216
By using the `Translations` component, you can easily configure your [form fields](https://filamentphp.com/docs/4.x/forms/fields/getting-started) to support multiple languages and provide translations for each locale.
217
217
218
218
```php
219
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
219
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
220
220
221
221
Translations::make('translations') // name is required to properly handle actions
You have the flexibility to customize the translation label for each field in each locale. You can use the `fieldTranslatableLabel()` method to provide custom labels based on the field instance and the current locale.
248
248
249
249
```php
250
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
250
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
251
251
252
252
Translations::make()
253
253
->schema([
@@ -261,7 +261,7 @@ use Filamerce\FilamentTranslatable\Forms\Component\Translations;
261
261
If you want to add a prefix or suffix locale label to the form field, you can use the `prefixLocaleLabel()` or `suffixLocaleLabel()` method. This makes it easier for users to identify the language associated with each field.
262
262
263
263
```php
264
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
264
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
By default, the prefix/suffix locale display name is generated from the locale code and enclosed in parentheses, "()". You may customize this using the `preformLocaleLabelUsing()` method:
277
277
278
278
```php
279
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
279
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
By default, the translate component and its content are wrapped in a container styled as a card. You may remove the styled container using `contained()`:
356
356
357
357
```php
358
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
358
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
359
359
360
360
Translations::make()
361
361
->contained(false)
@@ -366,7 +366,7 @@ Translations::make()
366
366
You can display translations as vertical tabs:
367
367
368
368
```php
369
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
369
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
370
370
371
371
Translations::make()
372
372
->vertical()
@@ -377,7 +377,7 @@ Translations::make()
377
377
You can customize plugin settings directly on the component:
378
378
379
379
```php
380
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
380
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
381
381
382
382
Translations::make()
383
383
->displayNamesInLocaleLabels(false)
@@ -389,7 +389,7 @@ Translations::make()
389
389
The `exclude` feature allows you to specify fields that you don't want to include in the translation process. This can be useful for fields that contain dynamic content or that shouldn't be translated into other languages.
390
390
391
391
```php
392
-
use Filamerce\FilamentTranslatable\Forms\Component\Translations;
392
+
use Webard\FilamentTranslatable\Forms\Component\Translations;
0 commit comments