Template:Nihongo/doc: Difference between revisions
mNo edit summary |
documented syntax with examples (all that was hidden in the template and the talk page) |
||
Line 1: | Line 1: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> |
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> |
||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> |
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> |
||
{{TOCright}} |
|||
{| style="background: none; border: none;" |
|||
==Usage== |
|||
⚫ | |||
{{Details|2=when to use this template|Wikipedia:Manual of Style (Japan-related articles)}} |
|||
; Syntax |
|||
{| CLASS="wikitable" |
|||
⚫ | |||
|- |
|||
|'''Gives'''|| {{Nihongo|English|Kanji|Romaji|extra|extra2}} |
|||
|} |
|} |
||
This template marks the <CODE>Kanji</CODE> segment as being in Japanese Kanji, which helps web browsers display it correctly. It also applies it the <TT>t_nihongo_kanji</TT> CSS style class. |
|||
Please see [[Wikipedia:Manual of Style (Japan-related articles)]] for information about when to use this template. |
|||
Parameters 1 and 2 and required. Parameters 4 and 5 can also be directly invoked with <CODE>extra=</CODE> and <CODE>extra2=</CODE>. Parameter extra2 is useful only in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold). |
|||
==Examples== |
|||
{| CLASS="wikitable" |
|||
|'''Code''' ||<CODE><NOWIKI>{{Nihongo|'''Motojirō Kajii'''|梶井 基次郎|Kajii Motojirō|1901–1932}}</NOWIKI></CODE> |
|||
|- |
|||
|'''Gives'''|| {{Nihongo|'''Motojirō Kajii'''|梶井 基次郎|Kajii Motojirō|1901–1932}} |
|||
|} |
|||
With <CODE>extra2</CODE>: |
|||
{| CLASS="wikitable" |
|||
|'''Code''' || |
|||
<CODE><NOWIKI>; {{Nihongo|komusō|虚無僧|extra2="Priest of nothingness"}}</NOWIKI></CODE><BR /> |
|||
<CODE><NOWIKI>: Mendicant priest of the Fuke sect of Zen Buddhism.</NOWIKI></CODE> |
|||
|- |
|||
|'''Gives'''|| |
|||
; {{Nihongo|komusō|虚無僧|extra2="Priest of nothingness"}} |
|||
: Mendicant priest of the Fuke sect of Zen Buddhism. |
|||
|} |
|||
Without <CODE>extra2</CODE>: |
|||
{| CLASS="wikitable" |
|||
|'''Code''' || |
|||
<CODE><NOWIKI>; {{Nihongo|komusō|虚無僧}} "Priest of nothingness"</NOWIKI></CODE><BR /> |
|||
<CODE><NOWIKI>: Mendicant priest of the Fuke sect of Zen Buddhism.</NOWIKI></CODE> |
|||
|- |
|||
|'''Gives'''|| |
|||
<!-- -->; {{Nihongo|komusō|虚無僧}} "Priest of nothingness" |
|||
<!-- -->: Mendicant priest of the Fuke sect of Zen Buddhism. |
|||
|} |
|||
==User style== |
|||
[[Help:User style|User style]] can be set by adding code similar to |
|||
: <nowiki>*[lang=ja] { color: green; font-family: Arial; }</nowiki> |
|||
or |
|||
: <nowiki>.t_nihongo_kanji { color: green; font-family: Arial; }</nowiki> |
|||
to [[Special:Mypage/common.css|common.css]]. |
|||
==See also== |
|||
* {{tl|Nihongo2}}, also displays the kanji properly, but without adding anything around |
|||
See also [[Template:Nihongo2]] |
|||
<includeonly> |
<includeonly> |
||
<!-- ADD CATEGORIES BELOW THIS LINE --> |
<!-- ADD CATEGORIES BELOW THIS LINE --> |
||
[[Category:Multilingual support templates|{{PAGENAME}}]] |
[[Category:Multilingual support templates|{{PAGENAME}}]] |
||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] |
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] |
||
<!-- ADD INTERWIKIS BELOW THIS LINE --> |
<!-- ADD INTERWIKIS BELOW THIS LINE --> |
||
[[eo:Ŝablono:Nihongo]] |
[[eo:Ŝablono:Nihongo]] |
||
[[es:Plantilla:Nihongo]] |
[[es:Plantilla:Nihongo]] |
||
Line 22: | Line 82: | ||
[[vi:Tiêu bản:Nihongo]] |
[[vi:Tiêu bản:Nihongo]] |
||
[[zh:Template:Nihongo]] |
[[zh:Template:Nihongo]] |
||
</includeonly> |
</includeonly> |
Revision as of 09:21, 12 October 2007
Template:Template doc page viewed directly
Usage
- Syntax
Code | {{Nihongo|English|Kanji|Romaji|extra|extra2}}
|
Gives | English (Kanji, Romaji, extra) extra2 |
This template marks the Kanji
segment as being in Japanese Kanji, which helps web browsers display it correctly. It also applies it the t_nihongo_kanji CSS style class.
Parameters 1 and 2 and required. Parameters 4 and 5 can also be directly invoked with extra=
and extra2=
. Parameter extra2 is useful only in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold).
Examples
Code | {{Nihongo|'''Motojirō Kajii'''|梶井 基次郎|Kajii Motojirō|1901–1932}}
|
Gives | Motojirō Kajii (梶井 基次郎, Kajii Motojirō, 1901–1932) |
With extra2
:
Code |
|
Gives |
|
Without extra2
:
Code |
|
Gives |
|
User style
User style can be set by adding code similar to
- *[lang=ja] { color: green; font-family: Arial; }
or
- .t_nihongo_kanji { color: green; font-family: Arial; }
to common.css.
See also
- {{Nihongo2}}, also displays the kanji properly, but without adding anything around