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 |familycolor=
, 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 {{language/arraysort|familycolor|{{{familycolor|Default}}}}}
, you can let another template define the parameter, or you can define it in the call.
For example, {{language/arraysort|familycolor|Tai-Kadai}}
returns the string {{language/arraysort|familycolor|Tai-Kadai}}
.
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, {{language/familycolor|Tai-Kadai=1}}
returns the string .
This parameter array also resolves calls where {{{familycolor}}}
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 {{if|{{{pink|}}}|blue}}
(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
{{language/familycolor |if=|Paleosiberian=1}}
returns, and
{{language/genetic |if=|Paleosiberian=1}}
returns . I hope that's not too confusing. --Gareth Hughes 20:59, 29 November 2005 (UTC)
- changes to the template seem to have made
{{language/familycolor |if=|Paleosiberian}}
unusable. Tobias Conradi (Talk) 19:52, 7 January 2006 (UTC)- This needs to be entered as
{{language/familycolor |if=|Paleosiberian=1}}
now. I've changed the calls in {{Language}} and {{Language/quilt}} 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 ☎ ✉ 20:17, 7 January 2006 (UTC)
- This needs to be entered as
- changes to the template seem to have made
Protection
[edit]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)