साँचा:Nihongo3
यह साँचा Citation Style 1 और Citation Style 2 जैसे उद्धरण साँचों में उपयोग नहीं करना चाहिए क्योंकि इसमें मार्कअप (कुछ विशिष्ट कोड) समाहित हैं जो COinS से आने वाले मॅटाडाटा को प्रदूषित कर देगा; अधिक जानकारी के लिए विकिपीडिया पर COinS देखें। |
This template uses Lua: |
Usage
संपादित करेंThis template is basically the same as {{Nihongo}}, except that it reverses the order of the English and Rōmaji items' display, and relies on a little bit of manual formatting for italics and quotation marks; its handling of Kanji (and/or Kana) is the same as that of {{Nihongo}}.
This template is useful when one is addressing a Japanese term directly instead of providing a Japanese translation for an English one, i.e. 'Japanese term in Rōmaji (Kanji version, "English translation")', instead of 'English term (Kanji version, Japanese translation in Rōmaji)'.
Syntax:
{{Nihongo3|<english>|<kanji/kana>|<rōmaji>|<extra>|<extra2>}}
|
Parameters:
- <english>. Optional. The word as translated into English. Note that this will sometimes be the actual Japanese word due to it being adopted into English.
- <kanji/kana>. Required when <rōmaji> is empty or omitted. The word as written using Japanese script (kanji, kana).
- <rōmaji>. Required when <kanji/kana> is empty. Transliteration of the Japanese word, using Hepburn Romanization.
- <extra>. Optional. Can be used to add a gloss (particularly if there is no English form). Can also be expressed as a named parameter,
extra=
- <extra2>. Optional. Can also be expressed as a named parameter,
extra2=
. It is only useful in ";" definitions (extra2 will be displayed without bold, whereas text following the template will get the bold).
This template marks the Kanji
segment as being in Japanese Kanji, which helps web browsers display it correctly. It also applies the t_nihongo_kanji
CSS style class to it.
Parameters 1, 2 and 3 are required, but the first may be blank (e.g. if the Kanji/Kana and Rōmaji are known but the English is not, use {{Nihongo3||<{{var|kanji/kana}}>|<{{var|rōmaji}}>}}
. Using the template without the Rōmaji and Kanji version is essentially pointless, and will result in a useless or worse-than-useless display. Parameters 4 and 5 can also be directly invoked with |extra=
and |extra2=
. Parameter |extra2=
is useful only in ";" definitions (|extra2=
's content will be displayed without bold, whereas text following the template will get the bold); see below for a concrete example.
Please note:
- The English parameter (the first one) does not automatically put quotation marks around its content. This may or may not be desired, depending upon the context and content (and as in example below, something else may be done, such as prefacing the English translation with something. Literal translations and linguistic glosses go in , not double.
- The Rōmaji parameter (the third one) does automatically put its content into italics, which in most cases other than proper names should be done (manually).
- The order of parameters is fixed, and is intentionally the same as that of {{Nihongo}} (despite it being not very intuitive for this template) to make most conversions between the two display formats a simple matter of a one-character change to the template name and some manual quotation mark and italics formatting (or removal thereof if converting from {{Nihongo3}} to {{Nihongo}}).
See examples below for usage hints.
Examples
संपादित करेंCode | {{Nihongo3|Western: '''Motojiro Kajii'''|梶井 基次郎|'''Kajii Motojirō'''|1901–1932}}
|
Gives | लुआ त्रुटि मॉड्यूल:Lang में पंक्ति 1670 पर: attempt to index field 'engvar_sel_t' (a nil value)। |
With extra2
:
Code |
|
Gives |
|
The extra2
parameter can be used for links, reference footnote citations, etc.
Without extra2
(and probably not the desired effect):
Code |
|
Gives |
|
Example of usage when it is not clear from the context that Japanese is the language in question:
Code |
|
Gives |
लुआ त्रुटि मॉड्यूल:Lang में पंक्ति 1670 पर: attempt to index field 'engvar_sel_t' (a nil value)। |
Do not use Japanese: 'English version'
for a case like this, as this colon formatting is used by Wikipedia language templates to indicate that the material that follows the colon is in the language mentioned before the colon, and this different use of this formatting will confuse readers. Use "for" or some other clear wording instead. Also, do not use {{Lang-ja|"English version"}}
(which renders as जापानी: "English version"); this even more explicitly signals that the material following the language name is in that language, and the text will appear (as it does in that example) in a different font.
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.
Error messaging
संपादित करेंThis template emits one error message of its own:
- error: {{nihongo3}}: Japanese or romaji text required
One of the positional parameters <kanji/kana>
({{{2}}}
), the 'Japanese' referred to in the error message or <rōmaji>
({{{3}}}
) is required for proper operation of this template. Articles with these errors are collected in Category:Nihongo template errors (0).
This error often occurs because the template is malformed:
{{Nihongo3|東京タワー}}
instead of{{Nihongo3||東京タワー}}
; 東京タワー is in{{{1}}}
(<english>
) instead of{{{2}}}
(<kanji/kana>
). To resolve this error, add the missing pipe (|
) or consider using{{lang}}
or{{transl}}
Because this template uses {{lang}} and {{transl}}
which emit their own error messages, see the help text for those at:
- श्रेणी:Lang and lang-xx template errors – for error messages emitted by {{lang}}
- श्रेणी:Transliteration template errors – for error messages emitted by {{transl}}
See also
संपादित करें- {{Nihongo}}, essentially same as this template, but gives English first and Rōmaji inside the parentheses
- {{Nihongo krt}}, essentially the same as this template, but gives kanji first with rōmaji and English inside the parentheses
- {{Nihongo foot}}, same as {{Nihongo}}, but puts everything but the English into a footnote.
- {{Nihongo2}}, also displays the kanji properly, but without adding anything in parentheses, without Rōmaji and without the extra parameters
- {{Nihongo-s}}, a simplified version of {{Nihongo}} without the extra spans or checks
Like {{Nihongo}} but lists '''rōmaji''' first
पैरामीटर | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
English translation | 1 | English translation of the Japanese term, but can be blank
| स्ट्रिंग | आवश्यक |
Kanji/kana | 2 | कोई विवरण नहीं
| स्ट्रिंग | आवश्यक |
Rōmaji | 3 | कोई विवरण नहीं
| स्ट्रिंग | आवश्यक |
extra text in parentheses | extra 4 | कोई विवरण नहीं | स्ट्रिंग | वैकल्पिक |
extra text after parentheses | extra2 5 | कोई विवरण नहीं | स्ट्रिंग | वैकल्पिक |
ऊपर दिए गए निर्देश साँचा:Nihongo3/doc से लिए गए है।(संपादन | इतिहास) संपादक इस साँचे के प्रयोगस्थल व प्रयोग पन्नों में प्रयोग कर सकते है। sandbox (create) and testcases (create) pages. कृपया /doc उपपृष्ठ पर श्रेणियाँ व विकियों के बिच की कड़ियाँ जोड़े। इस साँचे के उपपृष्ठ। |