Jump to content

Template:Translatable template name/pt-br

shortcuts: {{TNTN}} {{tntn}}
From mediawiki.org
This page is a translated version of the page Template:Translatable template name and the translation is 83% complete.
Documentação da predefinição

Propósito

Esta predefinição é utilizada para retornar no idioma da página atual o nome de uma predefinição traduzível. Templates, like all other MediaWiki pages, can be translated using the Translate extension, which creates subpages with the form "pagename/language code". Inicialmente, a predefinição verifica se o nome da página contém um código de idioma. Em caso afirmativo, verifica também se o nome da predefinição dado como primeiro parâmetro possui tradução naquele idioma. Se o nome da página não contiver um código de idioma, ou se a predefinição de navegação não existir naquele idioma, será exibida a predefinição em inglês.

Como utilizar

  • {{ {{Translatable template name|name of navigation template}}|parameters....}}
  • {{ {{TNTN|name of navigation template}}|parameters....}}
  • {{ {{tntn|name of navigation template}}|parameters....}}

Example (from translatable meta:Template:Meta, used in translatable page meta:Meta:About):

{{Translatable template name|Navbar}} or {{TNTN|Navbar}}

which returns the translated versions of {{Navbar }} if it exists, or the English version if translations don't exist.

Parâmetros

A versão atual da predefinição permite incluir qualquer tipo de parâmetros nomeados ou enumerados, cujos valores serão transferidos à predefinição chamada (exceto pelo parâmetro 1, que contém o nome-base da predefinição traduzível a ser transcluída). Parâmetros enumerados terão sua posição subtraída por 1, e todos os parâmetros nomeados serão passados sem mudanças.

Somente um parâmetro nomeado é tratado de forma diferente:

  • {{Translatable template name|tntns=:somename:|page name}}
  • {{TNTN|tntns=:somename:|page name}}
  • {{tntn|tntns=:somename:|page name}}

This tntns will be used to specify another namespace from which the translatable pagename will be transcluded, instead of referencing the page name from the default :Template: namespace. Note that this parameter is also passed (without modification) within the parameters of the transclusion.

Example with one parameters (from meta:Meta:About which is translatable):

  • {{ {{TNTN|Navbar}} |Meta:About}}

Dependency

See also