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

50 Xylophone Players talk23:31, 12 June 2012

It actually means the same as {{#ifeq:{{{i|}}}|i||i}}. If equals i, then show nothing, otherwise show i. —CodeCat 00:04, 13 June 2012 (UTC)

CodeCat00:04, 13 June 2012
Edited by 2 users.
Last edit: 13:10, 24 October 2017

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.

50 Xylophone Players talk03:09, 13 June 2012