Difference between revisions of "Module:Country adjective/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Pppery
({{high use}})
blackwiki>WOSlinker
m (change source to syntaxhighlight)
Line 4: Line 4:
  
 
== Usage ==
 
== Usage ==
<source lang="lua">local data = mw.loadData('Module:Country adjective')
+
<syntaxhighlight lang="lua">local data = mw.loadData('Module:Country adjective')
 
data.getCountryFromAdj[adjective]
 
data.getCountryFromAdj[adjective]
 
</source >
 
</source >

Revision as of 13:26, 7 July 2020

Module:Country adjective can be used to retrieve a country's name from its adjective or a country's adjective from its name. The list is based on List of adjectival and demonymic forms for countries and nations.

Usage

<syntaxhighlight lang="lua">local data = mw.loadData('Module:Country adjective') data.getCountryFromAdj[adjective] </source >

Function and parameter list

Function Parameter Explanation
getAdjFromCountry <country name> Retrieves the country adjective from a country name.
getCountryFromAdj <country adjective> Retrieves the country name from a country adjective.