Skip to content

Commit

Permalink
chore(api): language pack
Browse files Browse the repository at this point in the history
  • Loading branch information
jevantang committed May 12, 2024
1 parent 7e82540 commit f404bda
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Fresns/Api/Http/Controllers/GlobalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,15 @@ public function configs(Request $request)
}

// language pack
public function languagePack()
public function languagePack(Request $request)
{
$langTag = $this->langTag();
$langTag = $request->langTag;

$langTagArr = ConfigHelper::fresnsConfigLangTags();

if (empty($langTag) || ! in_array($langTag, $langTagArr)) {
$langTag = $this->langTag();
}

$languagePack = ConfigHelper::fresnsConfigLanguagePack($langTag);

Expand Down

0 comments on commit f404bda

Please sign in to comment.