Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
febrihidayan committed Aug 9, 2021
1 parent 712b995 commit 505e55d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Laratalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ class Laratalk
* @param string|null $locale
* @return array
*/
public static function availableTranslations(string $locale = null): array
public static function availableTranslations(?string $locale): array
{
return trans('laratalk::app', [], $locale ?? FacadesConfig::get('app.locale'));
return trans(
'laratalk::app',
[],
$locale ?? Auth::user()->{Config::userLocale()}
);
}

/**
Expand Down

0 comments on commit 505e55d

Please sign in to comment.