getMainConfig()->get( MainConfigNames::GrammarForms ); if ( isset( $grammarForms['hsb'][$case][$word] ) ) { return $grammarForms['hsb'][$case][$word]; } switch ( $case ) { case 'instrumental': # instrumental $word = 'z ' . $word; break; case 'lokatiw': # lokatiw $word = 'wo ' . $word; break; } # this will return the original value for 'nominatiw' (nominativ) and # all undefined case values. return $word; } }