Template:Native name/doc

An inline formatting template, based on lang, for indicating the language in which a native name has been given. By default, the native name is displayed in italics, followed by the language's name in a smaller-sized parenthesis. For example:

The template's defaults can be overridden and the parenthesis excluded, in which case there may be no visible changes to the text where it's used. An HTML span, however, still identifies the native name as a linguistic element, meaning that web browsers and screen readers can select a particular font, formatting, pronunciation, etc., for it.

Syntax

 * Common

The code for the example at the start of this documentation would, therefore, be:

Parameters
Required parameters shown in bold italics.

Code and result for the same name "Deutschland" above but with italics and nbsp switched off, nolink switched on and a parensize of 90%:
 * More complex examples

Retaining no italics but suppressing the parenthesis:

This result is the same as if the lang template had been used.

Annotated code
 ( ← 80 characters → )

Notes

Notes legend [a] = ISO 639 language code. [b] = the foreign-language name/phrase, displayed in italics unless italics/italic = off/no. [c] If paren/icon = omit/off/no, omit following parenthesis; [d] else if name/phrase is in italics [e] and nbsp isn't omit/no, add an extra space (to ensure italics doesn't lean                                                         into the parenthesis). [f] If nolink set, display unlinked language name in the parenthesis; [g] else if an article for this language exists, link to it as "(name)" in the parenthesis (eg "(French)"); [h] else return the error query "(language?)".