Wiktionary talk:Votes/2010-09/Language codes in templates

I think the wording needs to be much clearer. I certainly won't vote 'support' for something that's highly ambiguous. FWIW I'd support it if the template recognize lang=Portuguese instead of lang=pt, but it signals for AutoFormat (or another bot) to change it to lang=pt. Per mine and DCDuring's points made on the Beer Parlour. Mglovesfun (talk) 17:16, 22 September 2010 (UTC)


 * If AutoFormat, ot other bot owner voluntaries for that job, I too would [reword the vote and] support your suggestion. How the wording "When any template has its behavior affected by a parameter that specifies a language, requiring this parameter to be the language code, never the language name.", accompanied by an explanation of the context, is ambiguous? Do you have any suggestion for a similar wording or vote? --Daniel. 22:52, 22 September 2010 (UTC)


 * I don't understand what the vote means, either. Are we requiring that templates accept language codes (while also allowing them to support language names)? Are we requiring that templates accept only language codes (and that they break in some unspecified way if they receive a language name instead)? Are we requiring that users supply language codes (such that it's a policy violation to type lang=Italian in an entry)? Are we just generally endorsing the use of language codes, without intending any specific policy consequences of that endorsement? —Ruakh TALK 23:42, 22 September 2010 (UTC)

Necessity of codes
Why do we need the editor to use any language codes at all? We can use bots to create templates (eg ) to generate codes (eg es). All templates could therefore accept language names. For topical cats, we could have a template like to generate the right category (although I think we shouldn't even use the codes in cats either). There would cleanup work with language names (misspellings & alternate names), but much of this could be automated, and we do some of this cleanup already. And the added burden is probably less than making editors learn language codes. --Bequw → τ 21:25, 26 September 2010 (UTC)


 * Word. —Ruakh TALK 22:49, 26 September 2010 (UTC)


 * And incidentally, that sort of approach might make it easier to handle those cases where WMF language codes don't match real language codes, and where we therefore want to use one code in lang= attributes and a different code in interproject links. Template:ln2c:Spanish can just be es, but Template:ln2c:Cantonese can be something like   (such that  produces zh-yue, but  or  produces yue). It would be mostly transparent to entry-editors, though template-editors would need to understand the issue to know which to use. —Ruakh <i >TALK</i > 23:22, 26 September 2010 (UTC)
 * You might have to dumb it down a bit for people like me (in this case, me). Mglovesfun (talk) 23:25, 26 September 2010 (UTC)
 * We have a bunch of templates (eg ) that give us language name given a code. Lets make another set of templates (at least equal to the number of language code templates we have) that do the reverse. We'd have to prefix them l2c: or ln2c: so they don't get in the way of other templates. That way, if a template needs to use a language code (eg with topical categories) it can take as a parameter from the editor the language name, and do the lookup itself. Ruakh expands nicely on the idea, but a basic template like could literally just have the text "es". That help? --Bequw → τ 23:53, 26 September 2010 (UTC)