Thread:User talk:CodeCat/Code help

Hey, as I suggested on Metaknowledge's talk, I'm coming to you for some help now. I just can't see to understand some of this code...Yet again, it's a snippet from an Icelandic declension template.

|dats=

One thing really confusing me is that third nested switch:

Just what the hell does that do?? switch ? What? o.o