User:Tegnosis/Country Page (Brazil)

The goal is to read the pagename and then if it contains a country name, add something specific, if it doesn't do nothing. This would be much easier in Lua, but this parser function should work.

Note, the content after the last pipe (blank above) is the default case if the switch doesn't match anything.

Code
The following code:

Produces this on the page because the pagename contains "Brazil" (matching capitalization):

Components
The following is to demonstrate the components used: