User:Willscrlt/meta/iw

{{{{ns:User}}:Willscrlt/meta/lang|en|2|dir=ltr|text=

{{ns:user}}:Willscrlt/meta/iw automatically inserts interwiki links for each project to which Willscrlt contributes. It uses parser functions, variables, and other advanced template techniques to dynamically determine the current project and language, and based on that, the standard interwiki links that should be displayed on that project.

As-is, this template probably is not particularly useful to other people, but the logic used to determine the current project and which interwikis to display might be quite useful to others as a starting point for developing other templates. You are welcome to copy this template and adapt it however you like, but please do not edit this template, because it could break many other templates.

Usage
Copy the following text into the bottom of a page below any categories:

Attributes

 * To pick a specific page under my home user page, set the first attribute to the appropriate destination. Examples&#58;
 * points to "   :Willscrlt/meta"
 * points to "   :Willscrlt/meta/iw"
 * also points to "   :Willscrlt/meta/iw"
 * Note: there is no provision for pages located outside of my user space; either create redirects or manually add the interwikis
 * The default interwikis can be disabled or enabled as a group or individually.
 * suppresses interwikis for projects and languages other than: en.wiki, en.books, de.wiki, es.wiki, fr.wiki, it.wiki, pt.wiki, and simple.wiki
 * To disable interwikis for specific project types, set the corresponding value to "n" (overrides the ' ' setting)
 * — Wikipedia (also Commons and Test)
 * — Wikibooks
 * — Wikinews
 * — Wikiquote
 * — Wikiversity
 * — Wiktionary
 * To disable interwikis for specific languages, set the corresponding language value to "n" (overrides the ' ' setting)
 * Examples:,  ,  ,  ,  , etc.

Examples
{&#123;   :Willscrlt/meta/iw&#125;}
 * Adds the standard interwikis to the page based on the project name, the language , and server name .

{&#123;   :Willscrlt/meta/iw&#124;books=n&#125;}
 * Does not display standard interwikis on Wikibooks sites (for example, if a template is not ported over to any Wikibooks site)

{&#123;   :Willscrlt/meta/iw&#124;ar=n&#124;az=n&#124;be=n&#124;ca=n&#124;et=n &#124;ia=n&#124;id=n&#124;ie=n&#124;ja=n&#124;lt=n&#124;lmo=n&#124;nds=n&#124;pl=n&#124;sco=n&#124;tr=n&#125;}
 * Does not display interwikis on projects where the listed languages are set to "n"

Version information
v3.0.2 (14:13, 1 May 2009 (UTC)) — 

This template is used on multiple wiki projects. Unless it is horribly broken and causing major disruptions, please do not edit this template. The master template is located at m:User: and is manually distributed to other projects by its creator, Willscrlt (Talk).


 * History
 * v3.0.0 - Adds parameter '1' subpage support and uses new logic to determine support (incl. better English and Simple English determination)
 * v2.0.0 - Added switches for each language option and projects.
 * v1.2.0 - Fixes problems with Simple English sites that mimic the standard English language code ("en") instead of ("simple"), which would make templating things much easier.
 * v1.1.0 - Uses newer interwiki logic and has more links
 * v1.0.0 - Initial version

}}