Jump to content

Template:Vocabq/doc

From Wikibooks, open books for an open world

Overview

[edit source]

{{Vocabq}} is intended for use in foreign language learning books. It displays a word or phrase and its translation into a second language. It also allows users to interact with foreign language learning by quizzing themselves on the words or phrases, using the forthcoming open-source language learning app, vocabq.

To display a single word or phrase and its translation, use the stand-alone format:

{{vocabq
|l1= display name of language 1
|l2= display name of language 2
|t1= text in language 1
|t2= equivalent text in language 2
|alt= (optional) semicolon-separated list of other acceptable translations into language 2
}}

To display multiple words/phrases and their translations, use the table format as follows:

  • For the first row of the table, use the stand-alone format from above, plus |begintable=true.
  • For all remaining rows of the table, use only |t1=, |t2=, and optionally |alt=. You cannot specify language names in the middle of the table; the language names are only specified on the first row.
  • For the last row of the table, use |t1=, |t2=, optionally |alt=, and add |endtable=true.

To insert a link that users can use to quiz themselves on the words or phrases from the same page, use the special code {{vocabq}}.

For this template, l1 is simply the first language to be displayed, which may vary within a page. For example, for English speakers learning Spanish, it might be useful to have a table of translations from English into Spanish, and another table of translations from Spanish into English.

Examples

[edit source]

Stand-alone format:

Code Result
{{vocabq|l1=Spanish|l2=English|t1=Hola|t2=Hello|alt=Hi}}
Spanish text English translation Alternative translation(s)
Hola Hello Hi

Table format:

Code Result
{{vocabq|begintable=true|l1=English|l2=Spanish
 |t1=Good morning|t2=Buenos días}}
{{vocabq|t1=Good afternoon|t2=Buenas tardes}}
{{vocabq|endtable=true|t1=Good evening|t2=Buenas noches}}
English text Spanish translation Alternative translation(s)
Good morning Buenos días
Good afternoon Buenas tardes
Good evening Buenas noches

An example use of this template is on the page Polish/Adjectives.