مندرجات کا رخ کریں

سانچہ:Internal link helper/en

آزاد دائرۃ المعارف، ویکیپیڈیا سے

```

سانچہ:NoteTA

The {{Internal link helper}} series (internal link helper, abbreviated as "ilh" or "Link series") templates, commonly use shortcut sub-templates such as {{link-en}}, which are in-text interlanguage link templates. For terms without an article on Chinese Wikipedia, this template, in conjunction with a gadget, can display foreign language article links and previews for reference, in addition to generating internal links.

For articles not yet created in the Chinese version, the default is to replace red links with green links that display a tooltip on mouse hover (long press on mobile) for hints. Users can click the settings button in the pop-up (see image below) to enter settings and choose different styles.

When the corresponding Chinese article for a link is created, the template displays the same effect as a normal blue link (it can also be set to highlight in settings to distinguish it from normal links), and the article is categorized under Category:Pages with blue links but internal link helper templates not removed. After some time, bots will automatically remove the template. If a corresponding article actually exists in the Chinese version, but the editor filled in another name, a bot will currently automatically create a redirect.

Usage

[ترمیم]

{{Internal link helper}} cannot be used directly in articles; editors must call its language-specific sub-templates (e.g., {{Internal link helper/en}}). In practice, editors often use the {{link-xx}} shortcut, where xx represents the language code. For example, to display an English Wikipedia link, {{link-en}} can be used. See the #Sub-templates section below for available language codes.

Syntax

[ترمیم]

{{link-en|<Chinese Wikipedia page name>|<Foreign Wikipedia corresponding page name>|<Link actual display text>}}

The `en` in the code should be replaced with the actually needed language code, such as `ja` or `ru`.
Parameter Required? Description
`1` ہاں Chinese Wikipedia page name, equivalent to `XXX` in the internal link syntax `[[XXX|YYY]]`.
`2` Suggested Corresponding foreign Wikipedia page name, equivalent to `ZZZ` in `[[:en:ZZZ]]`. This parameter can be omitted if the Chinese and foreign versions have the same name.
`3`, `d` Optional Link actual display text, equivalent to `YYY` in the internal link syntax `[[XXX|YYY]]`. Can be omitted if it is the same as the page name.

Examples

[ترمیم]
Code Effect
{{link-en|مس پیک مین|Ms. Pac-Man}} مس پیک مینانگریزی : Ms. Pac-Man
{{link-en|دی بیچ بوائر|The Beach Boys}} دی بیچ بوائرانگریزی : The Beach Boys
{{link-en|مس پیک مین|Ms. Pac-Man}} مس پیک مینانگریزی : Ms. Pac-Man
{{link-en|مس پیک مین|Ms. Pac-Man}} مس پیک مینانگریزی : Ms. Pac-Man
{{link-en|مس پیک مین|Ms. Pac-Man}} مس پیک مینانگریزی : Ms. Pac-Man}

Sub-templates

[ترمیم]

Existing Sub-templates

[ترمیم]

سانچہ:Internal link helper/doc/Sub-template list

Creating Sub-templates

[ترمیم]

Since sub-templates have not yet been created, some language codes cannot be used. Editors can create sub-templates using the following method:

  1. First, confirm the language code of the corresponding language Wikipedia.
  2. Add the corresponding language code and its language name (e.g., `English`, `German`) to `Module:Ilh/data`.
  3. Use the following code to create `Template:Internal link helper/language code`:
<include{{subst:^}}only>{{#invoke:ilh|main |lang-code={{subst:SUBPAGENAME}} |1={{{1|{{{2|}}}}}} |2={{{2|}}} |d={{{d|{{{3|}}}}}} |nocat={{{nocat|}}}}}</includeonly><noinclude>{{دستاویز|Template:Internal link helper/doc}}</noinclude>
  1. Redirect the two pages `Template:language code-link` and `Template:Link-language code` to `Template:Internal link helper/language code`.
  2. Register the newly created template at `Template:Internal link helper/doc/Sub-template list`.

Display Effects

[ترمیم]

In conjunction with a gadget, the template provides multiple display effects. Users can click the settings button (gear in image 1 above) in the pop-up to enter the settings interface (image 2 above).

Setting Item Description Effect
Gadget Off
N/A Displays a red link with a parenthetical language tag and interlanguage link. Also the effect in mobile view. Test link: پانی (انگریزی: Water)
Link Appearance
Only display internal link (default setting) Displays a red or green internal link (depending on settings below), showing a pop-up with a preview and external link on click or hover (depending on settings below). {{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 120   | cHeight = 40   | oLeft = 19   | cWidth = 160   }}

Display internal link and original text without link Displays a red or green internal link, with the foreign page title in parentheses (without external link). {{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 742   | cHeight = 40   | oLeft = 19   | cWidth = 270   }}

Only display interwiki link Directly points to the foreign wiki. Displays a pop-up on click or hover. {{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 1354   | cHeight = 40   | oLeft = 19   | cWidth = 160   }}

Only display interwiki link and language name suffix Directly points to the foreign wiki, with language appended. Displays a pop-up on click or hover. {{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 1970   | cHeight = 40   | oLeft = 19   | cWidth = 240   }}

Pop-up Mode
Disabled Does not display pop-ups. N/A
Display on cursor hover (default setting) If the cursor hovers over the link, a pop-up is displayed. For touch devices (which do not support hover operations), a pop-up is displayed on click. (Desktop version) Display on mouse hover, or touch screen click
{{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 1137   | oTop = 388   | cHeight = 215   | oLeft = 44   | cWidth = 240   }}

(Mobile version) Display on click
{{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 1137   | oTop = 404   | cHeight = 265   | oLeft = 369   | cWidth = 295   }}

Display on click Always displays a pop-up when clicking the link. (Desktop version) Display on click
{{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 1137   | oTop = 388   | cHeight = 215   | oLeft = 44   | cWidth = 240   }}

(Mobile version) Display on click
{{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 1137   | oTop = 404   | cHeight = 265   | oLeft = 369   | cWidth = 295   }}

Internal Link Color
Red - Test link: Water
Green (default setting) Displays as red on hover and click. Default
{{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 120   | cHeight = 40   | oLeft = 19   | cWidth = 160   }}

On hover and click
Test link: Water
Highlight interlanguage links for locally existing articles (default: off)
N/A For interlanguage links pointing to already created pages, display in bright blue or bright purple (visited) to distinguish them from normal links and facilitate their discovery. {{CSS image crop

  | Image = Gadget-ilhpp-appearance-overview.png   | bSize = 2274   | oTop = 2658   | cHeight = 40   | oLeft = 23   | cWidth = 165   }}

Customization using CSS

[ترمیم]

Users can also customize the display effect via `personal CSS page`:

  • To disable the interlanguage link gadget and use small parenthetical interlanguage links, while hiding language tags, paste the following code into your personal CSS page:
.ilh-comment { font-size: smaller; }
.ilh-lang, .ilh-colon { display: none; }
  • If you want to use the old green color (which was replaced due to accessibility issues), you can copy the following code:
.ilh-page a.new {
    color: #00af89 !important;
}

.ilh-tool {
    color: #00af89 !important;
}

Technical Limitations

[ترمیم]

This template calls "high-cost parser functions" to determine whether a Chinese Wikipedia page has been created. Since high-cost functions are limited to 500 uses per page, when a page extensively uses green links (for example, by including a navigation template with many link templates), it may cause a `Category:Pages with templates included that are too large` error, resulting in the latter half of the article's templates not being displayed.

History

[ترمیم]
2008-2012 version schematic
2012-2024 version schematic

In the early days of Chinese Wikipedia, due to a lack of standardization, in-text interlanguage links were marked in various ways, such as direct links (`Example`), parenthetical notes (`Example ()`), etc. When the {{Internal link helper}} template was created in 2008, its intention was to gracefully display corresponding foreign language page links via webpage instant tips, avoiding the situation of a large number of original texts followed by parenthetical notes. However, at that time, unless a gadget was actively enabled, the template's additional effects could not be seen, so the template was not widely used.

Later, the community extensively discussed the usage of in-text interlanguage links and proposed various ways to represent them. In the 2012 vote on interlanguage link processing methods, the community pointed out that this template should be used to represent in-text interlanguage links, and various representation methods were integrated into the template for users to choose their preference.

In 2025, the new version of “⧼Gadget-ilhpp⧽” replaced the old version and became the default gadget for displaying interlanguage links.

TemplateData

[ترمیم]

Interlanguage link template Template "Internal link helper" cannot be used directly; it needs to be used with a suffix "/" + "language abbreviation" to select the corresponding template. Example: Selecting "Internal link helper/en" creates a green link to English Wikipedia. If you need a different abbreviation, please visit [[Template:Internal link helper]] to see the specific corresponding abbreviation explanation.

محددات سانچہ[انتظام TemplateData]

This template prefers inline formatting of parameters.

پیرامیٹروضاحتطرزحالت
Local article name 1 <Chinese Wikipedia page name>

Chinese Wikipedia page name, equivalent to XXX in the internal link syntax [[XXX|YYY]].

مثال
Nasser Khalili
صفحہمطلوب
Foreign article name2 <Foreign Wikipedia corresponding page name>

Foreign Wikipedia corresponding page name, equivalent to ZZZ in [[:en:ZZZ]]. This parameter can be omitted if the Chinese and foreign versions have the same name.

مثال
Nasser Khalili
صفحہتجویز کردہ
Display text, displays parameter 1 if it doesn't exist3 <Link actual display text>

Link actual display text, equivalent to YYY in the internal link syntax [[XXX|YYY]]. Can be omitted if it is the same as the page name.

مثال
Nasser David Khalili
اِسٹرنگاختیاری
nocatnocat

Requests to prevent inclusion in [[Category:Pages with blue links but internal link helper templates not removed]]. Judged based on [[Module:Yesno]], yes/y/true/1 etc. are valid activation values.

مثال
yes
اِسٹرنگاختیاری
[ترمیم]

```