Template talk:Infobox language/familycolor

This template is a parameter array. When language is looking to use the correct colour for a language family it compares the contents of, as defined in the article, with this array for the answer. This allows the colour of the templates for an entire language family to be changed with one edit: an edit to this template.

The most useful way to use this template is to follow its use in language. If you use the syntax, you can let another template define the parameter, or you can define it in the call.

For example,  returns the string.

It is easier to wash the parameter through language/arraysort first, and almost essential to do so if you're calling this from another template. All that template does is assign the dummy value 1 to a parameter based on the name of its second parameter.

For example, if you want to bypass the arraysort,  returns the string.

This parameter array also resolves calls where  is the name of a colour. This is a legacy requirement: please set up new calls to language family names. Language used to let each instance in an article define a colour for itself. If there was consensus to change a colour, every article would have to be edited. As the parameter was always given the name of a colour in the past, colour names were included in the array so that it could be switched on before having to replace family names in the parameter of every article. In the future, these colour names may be removed from the array once all articles are calling by language family names instead. There may be an intermediate time when all pink-coloured infoboxes are desired to be blue, and, as some 'pink' articles still call by colour name, the rather odd line  (literally, 'if pink, then blue') might have to be used. --Gareth Hughes 13:02, 22 November 2005 (UTC)


 * This array and language/genetic now use switch to take care of the sorting. This has obsoleted language/arraysort. You cannot use language/arraysort to read the arrays anymore. The syntax  returns , and   returns . I hope that's not too confusing. --Gareth Hughes 20:59, 29 November 2005 (UTC)


 * changes to the template seem to have made  unusable. Tobias Conradi (Talk) 19:52, 7 January 2006 (UTC)
 * This needs to be entered as  now. I've changed the calls in  and  to use that form. If there are other direct calls to language/familycolor they'd need to be updated also. The sleight variation in calling syntax is needed to convert this from a meta-template into a single template. --CBD &#x260E; &#x2709; 20:17, 7 January 2006 (UTC)

Protection
This sub-template is now under semi-protection: it may not be edited by new and unregistered users. This is reduce the change of vandalism and the excessive server load of an edit to a highly referenced template. --Gareth Hughes 19:34, 5 January 2006 (UTC)

Colorchanges

 * 2005-12-08 08:02 User:Peter Farago http://en.wikipedia.org/w/index.php?title=Template%3ALanguage%2Ffamilycolor&diff=30571705&oldid=29915660
 * 2006-01-07 12:00 User:Nixer http://en.wikipedia.org/w/index.php?title=Template%3ALanguage%2Ffamilycolor&diff=34232694&oldid=34164662