-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from slaubi/feature/da-language
danish language added
- Loading branch information
Showing
6 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace MenaraSolutions\Geographer\Services\Poliglottas; | ||
|
||
use MenaraSolutions\Geographer\Contracts\IdentifiableInterface; | ||
|
||
/** | ||
* Class Danish | ||
* @package MenaraSolutions\FluentGeonames\Services\Poliglottas | ||
*/ | ||
class Danish extends Base | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $code = 'da'; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected $defaultPrepositions = [ | ||
'from' => 'fra', | ||
'in' => 'i' | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Tests\Languages; | ||
|
||
use Tests\Test; | ||
use MenaraSolutions\Geographer\Earth; | ||
|
||
class DanishTest extends Test | ||
{ | ||
protected $forms = ['', 'to', 'from']; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $languageCode = 'da'; | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function all_countries_have_translated_names() | ||
{ | ||
$earth = new Earth(); | ||
$countries = $earth->getCountries(); | ||
|
||
foreach($countries as $country) { | ||
$this->assertNotEquals($country->setLocale($this->languageCode)->getName(), $country->setLocale('en')->getName()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters