Author: pinkampersand.wikimedia
Description:
Lately I've been working on some templates using the #language magic word, and I've wanted to write in fallbacks if someone specifies an invalid or unsupported code. Currently, I have to do this with the markup {{#ifeq:{{#language:{{{1}}}}}|{{{1}}}||<text to display>}}, which is somewhat cumbersome. So, my suggestion is that instead of simply returning the same thing someone input when the language code doesn't work, we also wrap it in <span class="error"></span>. That way, you'd be able to do fallbacks with the slightly simpler {{#iferror:{{#language:{{{1}}}}}||<text to display>}}.
Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/w/index.php?title=User:PinkAmpersand/Extra_sandbox&oldid=565498205