Template:When on basepage

{{#switch:

 {{#if:
 | {{#if:{{#titleparts:{{{page}}}|0|3}}
   | subsubpage    
   | {{#if:{{#titleparts:{{{page}}}|0|2}}
     | subpage
     | basepage
     }}
   }}
 | {{#if:{{#titleparts:Template:When on basepage|0|3}}
   | subsubpage    
   | {{#if:{{#titleparts:Template:When on basepage|0|2}}
     | subpage
     | basepage
     }}
   }}
 }}

| basepage = | subpage = | subsubpage = }} {{#switch:<translate></translate> | = Lua error: Internal error: The interpreter exited with status 127. | #default=

 Script error: No such module "Template translation".

}}