File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments