Template talk:langname

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Temporary[edit]

This should be used in all templates that currently only accept the full language name to allow them to accept language codes as well. This should not be used in place of {{language}} as it encourages inconsistency - it is only as a temporary measure until all templates that don't use {{language}} have been fixed, and the calls to them updated. Conrad.Irwin 09:48, 7 May 2008 (UTC)[reply]

It is possible that the end result should be the opposite, always using {langname} even though we prefer the code. If something (say, maybe, AF) routinely coverted "|lang=(name)" to the code, it would not be necessary to force a transition or insist that users know the code. (and the internals of langname and language can then be optimized) Robert Ullmann 14:00, 7 May 2008 (UTC)[reply]
The problem I see is that spellings of language names are less standardized. If someone enters a "bad" spelling and the template breaks, the editor may not know why. The codes are at least standardized and do not have spelling variants. --EncycloPetey 17:14, 30 June 2008 (UTC)[reply]

Proposed modification: use {{langname/name|…}} rather than {{#if:0|…}}[edit]

I've suggested modifying this template to use {{langname/name|…}} rather than {{#if:0|…}} in the event that the argument contains one or more uppercase characters (that is, in the event that the argument is the name of a language rather than the code for it). This will not affect entries in any visible way, but it will populate Special:WhatLinksHere/Template:langname/name with the list of pages wherein such arguments occur, allowing for some cleanup to take place. I believe CodeCat (talkcontribs) intends to implement that suggestion within the next few days if no one objects or has a better idea, so if you do, please leave a comment at Wiktionary:Grease pit#Finding out which pages call {{langname}} with a language name instead of a code. —RuakhTALK 01:56, 9 September 2010 (UTC)[reply]

RFDO discussion: April–June 2014[edit]

The following discussion has been moved from Wiktionary:Requests for deletion/Others.

This discussion is no longer live and is left here as an archive. Please do not modify this conversation, but feel free to discuss its conclusions.


Probably the last holdover from the language template era. Even from the time before that. But it's orphaned now. —CodeCat 23:51, 7 April 2014 (UTC)[reply]

Deleted. —CodeCat 18:45, 22 April 2014 (UTC)[reply]
@CodeCat I think it's orphaned because people substitute it. --kc_kennylau (talk) 18:50, 22 April 2014 (UTC)[reply]
Nothing seems to indicate there is any usage remaining. Entry struck, declaring this closed. Keφr 12:52, 8 June 2014 (UTC)[reply]


Why does this subst?[edit]

@Erutuon I think we need a template like this to generate the language name from the code in place of a complex module invocation. But why does this have a 'safesubst:' in front of it, and the doc say it has to be substituted? Benwing2 (talk) 03:58, 10 October 2019 (UTC)[reply]

@Benwing2: Hmm, I can't remember why I thought it should always be substituted. The safesubst bit is just to allow it to be substituted with {{subst:langname|...}}. May as well open it up to being used without substitution. — Eru·tuon 04:03, 10 October 2019 (UTC)[reply]