「テンプレート:Languages/Flag」の版間の差分
細 (Protected "Template:Languages/Flag": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(相違点なし)
|
2011年1月7日 (金) 03:53時点における版
This template gives a small icon of the language you put as first variable (2 letters, 639-1 ISO codes).
If you don't put the second variable, then the template assumes you are checking if the page where you put the template exists in the specified language.
If you provide a second variable, the flag will link to a page named as that variable.
Examples:
{{Languages/Flag|fr}}
returns (links to Template:FR/Languages/Flag/doc)
Putting
{{Languages/Flag|fr|Doc:FR/Manual}}
returns (links to Doc:FR/Manual which exists, hence the bright flag)
{{Languages/Flag|fr|Doc:FR/doesnt-exist}}
returns (links to Doc:FR/doesnt-exist which doesn't exist, hence the dark flag)
Note
The template code is quite simple, hence you have to know how you are using it. For example:
{{Languages/Flag|fr|Doc:IT/doesnt-exist}}works, but it returns the french flag with a link to Doc:IT/doesnt-exist (not a french page). |
Note for new languages
If you are going to do some translation in this wiki in a language that is not currently in the list of flags you see in the pages header, just work in the sandbox, specifying your language by using a page title like
[[Meta:Sandbox/Doc:MK/Manual/foo]] . If those pages will be complete then admins will add your flag to the headers.
|
This template is part of the blend-doc repository. We use categories to retrieve templates in order to commit it in that repository: please don't remove the categorization from this template.