diff --git a/spec/Coduo/PHPHumanizer/CollectionSpec.php b/spec/Coduo/PHPHumanizer/CollectionSpec.php index 709b137..8e9a6fa 100644 --- a/spec/Coduo/PHPHumanizer/CollectionSpec.php +++ b/spec/Coduo/PHPHumanizer/CollectionSpec.php @@ -35,4 +35,19 @@ function it_humanizes_collections_for_polish_locale() $this->oxford($example[0], $example[1], 'pl')->shouldReturn($example[2]); } } + + function it_humanizes_collections_for_dutch_locale() + { + $examples = array( + array(array("Michal"), null, 'Michal'), + array(array("Michal", "Norbert"), null, 'Michal en Norbert'), + array(array("Michal", "Norbert", "Lukasz"), 2, 'Michal, Norbert, en 1 andere'), + array(array("Michal", "Norbert", "Lukasz", "Pawel"), 2, 'Michal, Norbert, en 2 andere'), + array(array("Michal", "Norbert", "Lukasz", "Pawel"), null, 'Michal, Norbert, Lukasz, en Pawel'), + ); + + foreach ($examples as $example) { + $this->oxford($example[0], $example[1], 'nl')->shouldReturn($example[2]); + } + } } diff --git a/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml b/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml new file mode 100644 index 0000000..0ba299b --- /dev/null +++ b/src/Coduo/PHPHumanizer/Resources/translations/oxford.nl.yml @@ -0,0 +1,3 @@ +only_two: "%first% en %second%" +comma_separated: "%list%, en %last%" +comma_separated_with_limit: "{1} %list%, en 1 andere|[2,Inf] %list%, en %count% andere"