This template does the same as {{class}}, without italics (useful for NX-class ships and space station & starbase classes). Basic usage requires the class name as shown below:
{{class2|NX}}
produces: NX-class
{{class2|D5}}
produces: D5-class
If linking to a class that includes an extension in its name (to disambiguate it from other similarly named classes), add the extension (excluding parentheses) after the class name; for example:
{{class2|NX|mirror}}
produces: NX-class