Skip to content

Commit 1a893ce

Browse files
authored
Merge pull request #90 from Muetze42/development
feat: add share translations trait
2 parents e3f8afa + 19c1a18 commit 1a893ce

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace NormanHuth\Library\Traits;
4+
5+
trait ShareTranslationsTrait
6+
{
7+
/**
8+
* Load the messages for the given locale.
9+
*
10+
* @return array<string, string>
11+
*/
12+
protected function jsonTranslations(): array
13+
{
14+
return app('translator')
15+
->getLoader()
16+
->load(app()->getLocale(), '*', '*');
17+
}
18+
}

0 commit comments

Comments
 (0)