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={{{1|}}}{{{2}}}{{{3|}}}{{#switch:{{{4|}}}|i={{{4}}}|{{#switch:{{{3|}}}|={{#switch:{{{i|}}}|-=|i}}|{{#switch:{{{4|}}}|ur=ri|u={{{5}}}i|a={{#switch:{{{3}}}|m={{#switch:{{{5|}}}|r=ri|n=ni|{{{4|}}}{{{5|}}}i}}|{{{4|}}}{{{5|}}}i}}|{{{4|}}}{{{5|}}}i}}}}}}
One thing really confusing me is that third nested switch:
{{#switch:{{{i|}}}|-=|i}}
Just what the hell does that do?? switch({{{i}}}) ? What? o.o
I've given up on understanding this template I think...:L but yay success!! I successfully used my program to create all inflections (excl. indef dat & gen sg) of Ísland. :D Judging by the horridness of the decl template though, I'll have to see whether or not I need to modify my code to cater for other quirks in nouns of the declension. But even then after that I'll need to copy, paste, modify code for other declensions heh.