Skip to content

Commit

Permalink
fixed for es locale
Browse files Browse the repository at this point in the history
  • Loading branch information
yushine committed Jul 15, 2024
1 parent 54bb73a commit 447b4d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion database/seeders/LocaleSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,21 @@ private function getLocales(): array
'name' => 'English',
'code' => 'en',
'image' => 'images/flag/en.png',
'position' => 0,
'active' => 1,
],
[
'name' => 'Español',
'code' => 'es',
'image' => 'images/flag/es.png',
'position' => 1,
'active' => 1,
],
[
'name' => '简体中文',
'code' => 'zh_cn',
'image' => 'images/flag/zh_cn.png',
'position' => 1,
'position' => 2,
'active' => 1,
],
];
Expand Down
2 changes: 1 addition & 1 deletion innopacks/common/src/Repositories/LocaleRepo.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ public function getActiveList(): mixed
return self::$enabledLocales;
}

return self::$enabledLocales = $this->builder(['active' => true])->get();
return self::$enabledLocales = $this->builder(['active' => true])->orderBy('position')->get();
}
}

0 comments on commit 447b4d2

Please sign in to comment.