Template talk:Ethnologue

From Wikipedia, the free encyclopedia

This template is used to simplify the process of linking to artists at the Ethnologue website. It should be used in the External links section of an article.

There is one obligatory argument, code, referring to the three-letter ISO code for the language, and one optional argument, label, which provides the name of the language. If the label field is omitted, it defaults to the name of the article. For example, to link to the French language article at http://www.ethnologue.org/show_language.asp?code=fra, take the portion of the URL after "code=" and use that for the code field (spaces added for clarity):

*{{ethnologue|code=fra}}

When used in the article French language, this expands to:

If you want to use a different name from the name of the Wikipedia article, for example because Ethnologue calls the language by a different name, you can use the label code thus:

*{{ethnologue|code=gle|label=Irish Gaelic}}

which expands to:

[edit] Label parameter?

In most cases the label parameter shouldn't be necessary; it should just be the pagename. Can you alter it so that if the label parameter is omitted it automatically expands to {{PAGENAME}}? —Angr 17:43, 24 October 2006 (UTC)

I'm looking at the page for the Chong language, and the page title is "Ethnologue report for language code:cog." Are you referring to a different field on Ethnologue's pages? | Mr. Darcy talk 18:19, 24 October 2006 (UTC)
No, I mean the name of the Wikipedia article. The Wikipedia article is called Chong language, so it shouldn't be necessary to write {{ethnologue|code=cog|label=Chong language}}. It should be sufficient to write {{ethnologue|code=cog}} and have the template designed to find the name of the Wikipedia article and plug it in so that it displays correctly as Chong language at Ethnologue. —Angr 18:39, 24 October 2006 (UTC)
Oh, sorry, I misunderstood. I made the requested change; it looks like it's working on Chong language. Thanks. | Mr. Darcy talk 18:45, 24 October 2006 (UTC)
Okay. But there is a way to have the "label" parameter be optional, so that it can be included if people want it to say something different from {{PAGENAME}} but will default to {{PAGENAME}} if left blank. But that involves esoteric template syntax that I don't understand. —Angr 18:51, 24 October 2006 (UTC)
I don't know the required syntax either. That said, I created the template to see if we could standardize the way those links appear, and since all language page names follow the "X-ish language" format, this will do the trick. | Mr. Darcy talk 18:55, 24 October 2006 (UTC)
Still, I think flexibility is better. Not all language articles are called "X language" for one thing, and in some cases Wikipedia's name for the language may be different from Ethnologue's name, in which case people might want to use a different name in the template. —Angr 19:39, 24 October 2006 (UTC)
I've asked User:Garzo, who has experience with esoteric syntax, to stop by and make the label parameter optional. —Angr 19:53, 24 October 2006 (UTC)

Okay, he's done it. Thanks, Garzo! I've updated the instructions above accordingly. —Angr 15:54, 25 October 2006 (UTC)

[edit] Template:Ethnologue2

Template trivially altered for use in tables, see Endangered Languages in South America.

--Ling.Nut 02:36, 10 November 2006 (UTC)

For those who'd like to see the new template, here it is: {{ethnologue2}} | Mr. Darcy talk 02:44, 10 November 2006 (UTC)