Skip to content

Commit 3d821da

Browse files
committed
Update StaticLocale.php
1 parent b69d772 commit 3d821da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/data/src/Models/StaticLocale.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,20 @@ public function country()
9999
'as' => 'in', // Assamese -> India
100100
'or' => 'in', // Odia -> India
101101
'sa' => 'in', // Sanskrit -> India
102+
'ln' => 'cd', // Lingala -> Democratic Republic of Congo
103+
'kg' => 'cd', // Kongo -> Democratic Republic of Congo
104+
'sm' => 'ws', // Samoan -> Samoa
105+
'mn' => 'mn', // Mongolian -> Mongolia
102106
];
103107

104108
public function getLanguageFlagIconAttribute(): ?string
105109
{
106110
if ($this->language?->alpha2) {
107-
$flagCode = $this->languageToFlagMap[$this->language->alpha2] ?? strtolower($this->language->alpha2);
111+
$flagCode = $this->languageToFlagMap[$this->language->alpha2] ?? null;
112+
113+
if (! $flagCode) {
114+
return null;
115+
}
108116

109117
return 'flag-'.$flagCode;
110118
}

0 commit comments

Comments
 (0)