Skip to content

Commit 3edad0f

Browse files
committed
Update StaticLocale.php
1 parent ee5acf1 commit 3edad0f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/data/src/Models/StaticLocale.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public function country()
4242

4343
public function getLanguageFlagIconAttribute(): ?string
4444
{
45+
if ($this->language?->alpha2) {
46+
return match ($this->language->alpha2) {
47+
'ar' => 'flag-ar_arab',
48+
default => 'flag-'.strtolower($this->language->alpha2),
49+
};
50+
}
51+
4552
if (! $this->country?->alpha2) {
4653
return null;
4754
}

0 commit comments

Comments
 (0)