Module:Concert location/doc: Difference between revisions

m
(Created page with "This Lua module is designed to automatically generate categories for concert pages based on the location, date, and artist provided in an infobox. ==Features== *Detects U.S. states by abbreviation (e.g., "CA") or full name (e.g., "California"). *Detects non-U.S. countries by using the text after the last comma in the location string, with support for multi-word country names and common aliases (e.g., "London, UK" → "United Kingdom"). *Automatically prefixes "the" for c...")
 
m (→‎Examples: typo)
Line 22: Line 22:
| date    = March 19, 1992
| date    = March 19, 1992
}}</syntaxhighlight>
}}</syntaxhighlight>
'''Result:''' <nowiki>[[Category:Weezer concerts in California|1993]]</nowiki>
'''Result:''' <nowiki>[[Category:Weezer concerts in California|1992]]</nowiki>
<syntaxhighlight lang="wikitext" style="overflow:auto;">
<syntaxhighlight lang="wikitext" style="overflow:auto;">
{{Infobox concert
{{Infobox concert
Line 30: Line 30:
}}</syntaxhighlight>
}}</syntaxhighlight>
'''Result:''' <nowiki>[[Category:Weezer concerts in the United Kingdom|2022]]</nowiki>
'''Result:''' <nowiki>[[Category:Weezer concerts in the United Kingdom|2022]]</nowiki>
==Notes==
==Notes==
*If the location is not recognized or the artist is not in the allowed list, no category is generated.
*If the location is not recognized or the artist is not in the allowed list, no category is generated.
*The module assumes the last word in a non-U.S. location corresponds to the country.
*The module assumes the last word in a non-U.S. location corresponds to the country.