Skip to content

Commit

Permalink
- Update example translations wrapper name to a more descriptive one …
Browse files Browse the repository at this point in the history
…"_translation_wrapper"

- Make subtitles H4
  • Loading branch information
Artemiy committed Jul 17, 2024
1 parent 8ef8e7f commit 6209f81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $post = Post::create($data);
echo $post->translate('fr')->title; // Mon premier post
```

### Filling multiple translations wrapped
#### Filling multiple translations wrapped

You may define a wrapper property when creating new translations. Set the `translations_wrapper` property in translatable config file:
```php
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $post = Post::create($data);
echo $post->translate('fr')->title; // Mon premier post
```

### Filling multiple translations wrapped
#### Filling multiple translations wrapped

You may define a wrapper property when creating new translations. Set the `translations_wrapper` property in translatable config file:
```php
Expand Down
4 changes: 2 additions & 2 deletions tests/TranslatableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ public function it_creates_translations_using_mass_assignment_and_locales(): voi
#[Test]
public function it_creates_translations_using_wrapped_mass_assignment_and_locales(): void
{
$this->app->make('config')->set('translatable.translations_wrapper', 'translations');
$this->app->make('config')->set('translatable.translations_wrapper', '_translation_wrapper');

$vegetable = Vegetable::create([
'quantity' => 5,
'translations' => [
'_translation_wrapper' => [
'en' => ['name' => 'Peas'],
'fr' => ['name' => 'Pois'],
],
Expand Down

0 comments on commit 6209f81

Please sign in to comment.