getMainConfig()->get( MainConfigNames::GrammarForms ); if ( isset( $grammarForms['bs'][$case][$word] ) ) { return $grammarForms['bs'][$case][$word]; } switch ( $case ) { case 'instrumental': # instrumental $word = 's ' . $word; break; case 'lokativ': # locative $word = 'o ' . $word; break; } # this will return the original value for 'nominativ' (nominative) # and all undefined case values. return $word; } }