Template:Mdnbox/doc: Difference between revisions

Jump to navigation Jump to search
.
No edit summary
(.)
Line 5: Line 5:


==Parameters==
==Parameters==
There are 4 named parameters (see the table below), none of which is required for the template to work, but one of which has to be used together with one or more of the other parameters.
There are 3 named parameters (see the table below), none of which is required for the template to work.


{| class="wikitable"
{| class="wikitable"
|-
|-
! Parameter !! Description
! Parameter !! Description
|-
| <code>lang</code> || Language code
|-
|-
| <code>zone</code> || MDN zone
| <code>zone</code> || MDN zone
Line 21: Line 19:


;<big>Copy-paste template</big>
;<big>Copy-paste template</big>
* <code><nowiki>{{mdnbox|lang= |zone= |wpla= |tool= }}</nowiki></code>
* <code><nowiki>{{mdnbox|zone= |wpla= |tool= }}</nowiki></code>
 
===Language===
''Conditional''
;<big>lang</big>
It is possible to specify a MDN locale code for the link (e.g. <tt>de</tt> for German or <tt>sv-SE</tt> for Swedish). If this parameter is left out, the link will be redirected at MDN to either the locale of the user's Firefox browser, or (if there is no translation of that webpage for the user's locale) to the English default locale (<tt>en-US</tt>). An up-to-date list of Mozilla's web locale codes can be found at the [https://l10n.mozilla-community.org/webdashboard/ Mozilla Web Localization Dashboard].
 
;Limitation
* Cannot be used on its own, it will only have an effect if used together with one or more of the other three parameters.
 
;Usage:
* <code><nowiki>{{mdnbox|</nowiki>lang=''locale code''<nowiki>}}</nowiki></code>


===MDN zone===
===MDN zone===
Line 140: Line 127:
;<big>tool</big>
;<big>tool</big>
<code><nowiki>{{mdnbox|tool=jsdeb}}</nowiki></code> gives
<code><nowiki>{{mdnbox|tool=jsdeb}}</nowiki></code> gives
<br><br><br><br>
{{mdnbox|lang=de}}
;<big>lang</big> (only)
<code><nowiki>{{mdnbox|lang=de}}</nowiki></code> gives
<br><br><br><br>
{{mdnbox|lang=de}}
;<big>lang</big> (with another parameter)
<code><nowiki>{{mdnbox|lang=de|zone=ff}}</nowiki></code> gives
<br><br><br><br>
<br><br><br><br>
{{mdnbox|zone=ff|wpla=html5|tool=jsdeb}}
{{mdnbox|zone=ff|wpla=html5|tool=jsdeb}}
3,860

edits

Navigation menu