Skip to content

Commit

Permalink
Merge pull request #7 from HatemElsaid/main
Browse files Browse the repository at this point in the history
Add Nationalities With Ar and En
  • Loading branch information
MoamenEltouny authored Nov 19, 2023
2 parents 398997b + 8821d63 commit b17db73
Show file tree
Hide file tree
Showing 4 changed files with 1,013 additions and 534 deletions.
7 changes: 5 additions & 2 deletions src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ function getCountries(?string $lang = null)
$countries = require __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'country.php';

if ($lang != 'en') {
$lang = require __DIR__ . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . 'country.php';
$list = require __DIR__ . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . 'country.php';
$nationalities = require __DIR__ . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR . 'nationality.php';

foreach($countries as $code => &$info){
$info['name'] = $lang[$code];
$info['name'] = $list[$code];
$info['nationality'] = $nationalities[$code];
}
}

Expand Down
Loading

0 comments on commit b17db73

Please sign in to comment.