Misplaced Pages

Template:Babel: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 21:45, 5 May 2006 view sourceCBDunkerson (talk | contribs)Administrators15,422 edits Converting to a 'single row' format so that it is possible to produce multiple columns← Previous edit Latest revision as of 14:46, 9 July 2016 view source SMcCandlish (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, File movers, New page reviewers, Pending changes reviewers, Rollbackers, Template editors201,744 edits bypass redir 
(61 intermediate revisions by 32 users not shown)
Line 1: Line 1:
{{#invoke:Babel|main}}<noinclude>
{| name="userboxes" id="userboxes" style="float: right; margin-left: 1em; margin-bottom: 0.5em; width: 242px; border: #99B3FF solid 1px; clear: right"
{{documentation}}
|-
<!-- Add categories and interwikis to the /doc subpage, not here! -->
! style="background-color: {{{color|}}}; text-align: center" colspan="10" | {{{header|]}}}
|-
| {{#if:{{{1|}}}|{{User {{{1}}}}}
}}{{#if:{{{2|}}}|{{User {{{2}}}}}
}}{{#if:{{{3|}}}|{{User {{{3}}}}}
}}{{#if:{{{4|}}}|{{User {{{4}}}}}
}}{{#if:{{{5|}}}|{{User {{{5}}}}}
}}{{#if:{{{6|}}}|{{User {{{6}}}}}
}}{{#if:{{{7|}}}|{{User {{{7}}}}}
}}{{#if:{{{8|}}}|{{User {{{8}}}}}
}}{{#if:{{{9|}}}|{{User {{{9}}}}}
}}{{#if:{{{10|}}}|{{User {{{10}}}}}
}}{{#if:{{{11|}}}|{{User {{{11}}}}}
}}{{#if:{{{12|}}}|{{User {{{12}}}}}
}}{{#if:{{{13|}}}|{{User {{{13}}}}}
}}{{#if:{{{14|}}}|{{User {{{14}}}}}
}}{{#if:{{{15|}}}|{{User {{{15}}}}}
}}{{#if:{{{16|}}}|{{User {{{16}}}}}
}}{{#if:{{{17|}}}|{{User {{{17}}}}}
}}{{#if:{{{18|}}}|{{User {{{18}}}}}
}}{{#if:{{{19|}}}|{{User {{{19}}}}}
}}{{#if:{{{20|}}}|{{User {{{20}}}}}
}}{{#if:{{{21|}}}|{{User {{{21}}}}}
}}{{#if:{{{22|}}}|{{User {{{22}}}}}
}}{{#if:{{{23|}}}|{{User {{{23}}}}}
}}{{#if:{{{24|}}}|{{User {{{24}}}}}
}}{{#if:{{{25|}}}|{{User {{{25}}}}}
}}{{#if:{{{26|}}}|{{User {{{26}}}}}
}}{{#if:{{{27|}}}|{{User {{{27}}}}}
}}{{#if:{{{28|}}}|{{User {{{28}}}}}
}}{{#if:{{{29|}}}|{{User {{{29}}}}}
}}{{#if:{{{30|}}}|{{User {{{30}}}}}
}}{{#if:{{{31|}}}|{{User {{{31}}}}}
}}{{#if:{{{32|}}}|{{User {{{32}}}}}
}}{{#if:{{{33|}}}|{{User {{{33}}}}}
}}{{#if:{{{34|}}}|{{User {{{34}}}}}
}}{{#if:{{{35|}}}|{{User {{{35}}}}}
}}{{#if:{{{36|}}}|{{User {{{36}}}}}
}}{{#if:{{{37|}}}|{{User {{{37}}}}}
}}{{#if:{{{38|}}}|{{User {{{38}}}}}
}}{{#if:{{{39|}}}|{{User {{{39}}}}}
}}{{#if:{{{40|}}}|{{User {{{40}}}}}
}}{{#if:{{{41|}}}|{{User {{{41}}}}}
}}{{#if:{{{42|}}}|{{User {{{42}}}}}
}}{{#if:{{{43|}}}|{{User {{{43}}}}}
}}{{#if:{{{44|}}}|{{User {{{44}}}}}
}}{{#if:{{{45|}}}|{{User {{{45}}}}}
}}{{#if:{{{46|}}}|{{User {{{46}}}}}
}}{{#if:{{{47|}}}|{{User {{{47}}}}}
}}{{#if:{{{48|}}}|{{User {{{48}}}}}
}}{{#if:{{{49|}}}|{{User {{{49}}}}}
}}{{#if:{{{50|}}}|{{User {{{50}}}}}
}}{{#if:{{{51|}}}|{{User {{{51}}}}}
}}{{#if:{{{52|}}}|{{User {{{52}}}}}
}}{{#if:{{{53|}}}|{{User {{{53}}}}}
}}{{#if:{{{54|}}}|{{User {{{54}}}}}
}}{{#if:{{{55|}}}|{{User {{{55}}}}}
}}{{#if:{{{56|}}}|{{User {{{56}}}}}
}}{{#if:{{{57|}}}|{{User {{{57}}}}}
}}{{#if:{{{58|}}}|{{User {{{58}}}}}
}}{{#if:{{{59|}}}|{{User {{{59}}}}}
}}{{#if:{{{60|}}}|{{User {{{60}}}}}
}}{{#if:{{{61|}}}|{{User {{{61}}}}}
}}{{#if:{{{62|}}}|{{User {{{62}}}}}
}}{{#if:{{{63|}}}|{{User {{{63}}}}}
}}{{#if:{{{64|}}}|{{User {{{64}}}}}
}}{{#if:{{{65|}}}|{{User {{{65}}}}}
}}{{#if:{{{66|}}}|{{User {{{66}}}}}
}}{{#if:{{{67|}}}|{{User {{{67}}}}}
}}{{#if:{{{68|}}}|{{User {{{68}}}}}
}}{{#if:{{{69|}}}|{{User {{{69}}}}}
}}{{#if:{{{70|}}}|{{User {{{70}}}}}
}}{{#if:{{{71|}}}|{{User {{{71}}}}}
}}{{#if:{{{72|}}}|{{User {{{72}}}}}
}}{{#if:{{{73|}}}|{{User {{{73}}}}}
}}{{#if:{{{74|}}}|{{User {{{74}}}}}
}}{{#if:{{{75|}}}|{{User {{{75}}}}}
}}{{#if:{{{76|}}}|{{User {{{76}}}}}
}}{{#if:{{{77|}}}|{{User {{{77}}}}}
}}{{#if:{{{78|}}}|{{User {{{78}}}}}
}}{{#if:{{{79|}}}|{{User {{{79}}}}}
}}{{#if:{{{80|}}}|{{User {{{80}}}}}
}}{{#if:{{{81|}}}|{{User {{{81}}}}}
}}{{#if:{{{82|}}}|{{User {{{82}}}}}
}}{{#if:{{{83|}}}|{{User {{{83}}}}}
}}{{#if:{{{84|}}}|{{User {{{84}}}}}
}}{{#if:{{{85|}}}|{{User {{{85}}}}}
}}{{#if:{{{86|}}}|{{User {{{86}}}}}
}}{{#if:{{{87|}}}|{{User {{{87}}}}}
}}{{#if:{{{88|}}}|{{User {{{88}}}}}
}}{{#if:{{{89|}}}|{{User {{{89}}}}}
}}{{#if:{{{90|}}}|{{User {{{90}}}}}
}}{{#if:{{{91|}}}|{{User {{{91}}}}}
}}{{#if:{{{92|}}}|{{User {{{92}}}}}
}}{{#if:{{{93|}}}|{{User {{{93}}}}}
}}{{#if:{{{94|}}}|{{User {{{94}}}}}
}}{{#if:{{{95|}}}|{{User {{{95}}}}}
}}{{#if:{{{96|}}}|{{User {{{96}}}}}
}}{{#if:{{{97|}}}|{{User {{{97}}}}}
}}{{#if:{{{98|}}}|{{User {{{98}}}}}
}}{{#if:{{{99|}}}|{{User {{{99}}}}}
}}{{#if:{{{100|}}}|{{User {{{100}}}}}}}
|-
| style="background-color: {{{color|}}}; text-align: center" colspan="10" | {{{footer|]}}}
|}<noinclude>
*] - Allows 1 to 100 boxes.<br />Format: <nowiki>{{Babel-X|<box1>|<box2>|<box3>...}}</nowiki>
To specify a custom header, footer, or color add the parameters header=''HEADER'' (default: ]), footer=''FOOTER'' (default: ]), and/or color=''COLOR'' (default: white). Call the '!' userbox to start a new column after that point.

Example: <nowiki>{{Babel-X|color=yellow|en|fr|de|!|tl|ru|leet}}</nowiki> produces:

{{Babel-X|color=yellow|en|fr|de|!|tl|ru|leet}}
]
]
]
</noinclude> </noinclude>

Latest revision as of 14:46, 9 July 2016

Misplaced Pages:Babel
You haven't set up any languages. Please see Template:Babel/doc for help.
Search user languages
Template documentation[view] [edit] [history] [purge]
This template should not be substituted.
This template uses Lua:
WarningThis template is used on approximately 43,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

{{Babel}} is a template for showing the languages that you know, as well as the operating system, keyboard layout, web browser, desktop environment, and text editor that you are most comfortable with. Details of how to use it for its original purpose—showing the languages that you know—are at Misplaced Pages:Babel.

Usage

{{Babel|<box1>|<box2>|<box3>...}}

Parameters can be added using the {{!}} and {{=}} tricks:

{{Babel|0RR{{!}}border-c{{=}}red}}

Misplaced Pages:Babel
0RRThis user prefers discussing changes on the talk page rather than engaging in an edit war.
Search user languages

The Babel box prefixes its arguments with "User ", so it will work with the User: namespace:

{{Babel|:UBX/Userboxes/Thank Button}}

Misplaced Pages:Babel
This user likes to use the thank button.
Search user languages

Set the nocat parameter to yes to suppress categories.

Custom styling

To customize the appearance you can add the optional parameters

|align=left
to display the babel box on the left side of the screen rather than the default right
|header=header
change header, default is Misplaced Pages:Babel
|footer=footer
change wiki markup for footer, default is ] (which appears as Search user languages)
|bordercolor=color
color of the border, default is #99B3FF
|color=color
background color, default is white
|textcolor=color
text color, default is black
|left=pixels
left margin in pixels, default is 1
|bottom=pixels
bottom margin in pixels, default is 0.5
|solid=pixels
solid border width, default is 1
|width=pixels
width of the box, default is 248
|extra-css=css-code
any other custom formatting

Columns and separators

  • Use ! to start a new column after that point
  • Use - to insert a blank row
  • Use head to insert a header; use head-m to insert a header without text
  • Use line to insert a horizontal ruler separator

For example,

{{Babel
| align  = left
| header = Userboxes
| color  = yellow
| head           | en    | tl-1       | ru-2
| line           | pas   | :UBX/1337  | !
| head{{!}}Other | 1RR   | help desk  | -
| line           | happy | wikipedia/WikiFairy
}}

Produces:

Userboxes
Misplaced Pages:Babel
enThis user is a native speaker of the English language.
tl-1Ang tagagamit na ito ay nakakapag-ambag ng Tagalog sa mababang antas.
ru-2Этот участник неплохо знает русский язык.

pasThis user can program in Pascal.
13377|-|15 |_|x0r 5|>34|<5 1337.
Other
1RRThis user prefers discussing changes on the talk page rather than engaging in an edit war.
Help DeskThis user volunteers at the
Misplaced Pages Help Desk.
  

This user is happy and always will be.
This user is a WikiFairy.
Search user languages

Copying template to other wikis

The page you are viewing right now is the actual Babel template. If you click "edit this page", you will see an invocation of Module:Babel, in Lua, that makes the Babel boxes work. What you're reading right now is just documentation for that code, transcluded inside "<noinclude>" tags so it doesn't interfere with the computer code.

In order to use Babel boxes in another Wikimedia project, you need both the template and the module. Click "view source" and copy all the contents, including the computer code. Create a page called "Template:Babel" on the other Wikimedia project and put the content into it. Do the same for the module.

You will also need to copy over a bunch of templates with names like "Template:User en", "Template:User en-1", "Template:User fr", and so on. Once you've done that, users can put, for example, "{{Babel|en-1|fr}}" on their user page, and the Babel boxes will be displayed.

See also

The above documentation is transcluded from Template:Babel/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories: