Template:A or an/doc

This template determines whether the first word in the argument provided begins with a vowel or consonant and returns with it "a" or "an" depending on the assessment.

Usage
In general, it returns "an" if the first letter is a, e, i, o, or u, and "a" if any other:



To capitalize "a", wrap the template in.



Words beginning with a vowel letter
Words that begin with eu, ew, uni, etc., and others like one, once, and U are exceptions:



Some exceptions are made to the above rule.



Words beginning with a consonant letter
Words that begin with a consonant letter also have some exceptions:



Abbreviations
Words in all caps are treated as initialisms. If an initialism begins with F, H, L, M, N, R, S, or X, it returns "an." If it begins with U, it returns "a." Thus:



Some notable acronyms are made exceptions.



Numbers
If the first word begins with 8, 11, or 18, it returns "an," unless it is read with "hundred," "thousand," etc. at the beginning.


 * → "" (assumes it's a year)
 * → "" (assumes it's a year)
 * → "" (assumes it's a year)
 * → "" (assumes it's a year)

Ambiguous cases
If us is set, herb(s) and herbal are treated as starting with a vowel sound.



Words before which people have not settled on whether to use "a" or "an" are generally not made exceptions, so the general rules apply.



If the first letter is a non-Latin character, it returns "a" by default.



If the parameter is not entered, it returns an empty string.