Module:languages/error/documentation

Preferred calling convention
Here, we call  with the parameter name in the second parameter.

Old (obsolete) calling convention
Looks at a supposed language code passed through a template parameter and returns a helpful error message depending on whether the language code has a valid form (two or three lowercase basic Latin letters, two or three groups of three lowercase basic Latin letters separated by hyphens).

Add the parameter value in argument #1 and the parameter name in argument #2. For instance, if parameter lua of the template is supposed to be a language code, this function can be called the following way:

If you would like the error message to say something other than "language code", place the phrase in argument #3.