模板:Expand language

Ph9讨论 | 贡献2020年12月27日 (日) 14:49的版本 (导入1个版本)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

{{#ifeq:{{{small}}}|left|}}{{#ifeq:{{ safesubst:#if:

 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Expand language}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Expand language}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:yes|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Articles to be expanded from 
   ||}}
 |[[Category:{{#if:
              ||Articles to be expanded}}]]}}{{#if:All articles to be expanded
     |}}}}}}
50px Template documentation[view] [edit] [history] [purge]

{{#ifeq:expand language |doc

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:模板:Expand language
                  | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}
{{#if:||{{#ifeq:Expand language|Expand language|}}}}

Typical usage编辑

If you find an article in the English Wikipedia is much less complete than the corresponding article in another language, there are a series of templates you can use to announce this on the page. Do not use this template, but instead, please use the appropriate template in Category:Expand by language Wikipedia templates. If the language you are looking for doesn't already have a template, see below for instructions on how to make one.

How to create a new daughter template using this template编辑

{{Expand language
|langcode=
|otherarticle={{{1|}}}
|section={{{section|}}}
|date={{{date|}}}
|fa={{{fa|}}}
|topic=
|nodoc={{{nodoc|}}}
|no interwiki={{{no interwiki|}}}
}}

Example for Spanish (see {{Expand Spanish}}):

{{Expand language
|langcode=es
|otherarticle={{{1|}}}
|section={{{section|}}}
|date={{{date|}}}
|fa={{{fa|}}}
|topic={{{topic|}}}
}}

Uncommon override parameters:

|googlelangcode= <!-- for where Google's language translation code is not the same as the Wikipedia language translation code -->

(Currently only used in Template:Expand Norwegian (Nynorsk).)

For a list of all daughter templates, see Category:Expand by language Wikipedia templates.

What else needs to be done after you set up the template编辑

For all of these steps, replace XXXX with the name of the language you just created. {{#if:|}}{{#switch:¬

|¬=
|SUBST=

}}{{#if:|{{#ifeq:{{{name}}}|Expand language||{{#if:||}}}}}}{{#if:

|
|[{{#if:
 | 
}}clarification needed{{#if:
 | 
}}]

}}

1. Create a template documentation page.

This is easy. Just go to Template:Expand XXXX/doc. There, you should paste {{Expand language/howto|XXXX}}.

2. Set up the category where articles to be translated will go.

Go to Category:Articles needing translation from XXXX Wikipedia. There, paste the following:

{{Transcat
|language=XXXX
|empty=y
}}

You can also add categories there for Wikiprojects that may be interested.

Multiple languages编辑

Multiple languages can be specified in the same template using |{{SAFESUBST:#if:langcode2|langcode2=}}, |{{SAFESUBST:#if:otherarticle2|otherarticle2=}}, |{{SAFESUBST:#if:langcode3|langcode3=}} and |{{SAFESUBST:#if:otherarticle3|otherarticle3=}}. This functionality is not accessible in wrapper templates.


{{#if:{{#ifeq:Expand |sandbox|1}}{{#ifeq:Expand language|doc|1}}||

}}