/** * @dataProvider provideGetName */ public function testGetName($structureType, $name, $expectedName) { $this->properties->setLanguage('de'); $this->properties->setStructureType($structureType); $res = $this->properties->getName($name); $this->assertEquals($expectedName, $res); }
/** * {@inheritdoc} */ public function setLanguageCode($languageCode, $languageNamespace, $namespace) { // build namespace $namespaces = []; if (!empty($namespace)) { $namespaces[] = $namespace; } if (!empty($this->additionalPrefix)) { $namespaces[] = $this->additionalPrefix; } $this->translatedProperties = new MultipleTranslatedProperties($this->properties, $languageNamespace, implode('-', $namespaces)); $this->translatedProperties->setLanguage($languageCode); }
/** * Configures translated properties to given locale. * * @param string $locale */ protected function setLocale($locale) { $this->translatedProperties->setLanguage($locale); }