In general, in cases where American spelling differs from Commonwealth/"British" spelling, use the American spelling.
When in doubt about the spelling of a word, first see the word list; if it's not covered there, then see Merriam-Webster's Collegiate Dictionary, Eleventh Edition (abbreviated as MW11).
Spellings that are nonstandard in the US (and thus shouldn't be used in Google-related documentation) are marked in MW11 as chiefly British.
Recommended: Practice sorting a ton of aluminum by color; authorize the center to give the armory a license for maneuvers; measure in kilograms and kilometers; it behooves you to accessorize your curbs.
Not recommended: Practise sorting a tonne of aluminium by colour; authorise the centre to give the armoury a licence for manoeuvres; measure in kilogrammes and kilometres; it behoves you to accessorise your kerbs.
Although non-American readers tend to be tolerant of reading
American spelling in technical documentation, they may find it difficult to have
to type American spelling. For example, if your documentation tells a
reader who's used to the spelling
colour to type
color, they may mistype it. So when you use filenames, URLs, and
data parameters in examples, try to avoid words that are spelled differently by
different groups of English speakers.
Following are a few additional resources, although these are not definitive:
- The spelling section of Wikipedia's manual of style includes a useful table showing spelling differences for some common words in seven countries.
- UK vs US spelling: a list of over 1700 differences. Very useful, but several of the listed UK spellings are common in the US, and the list omits at least one difference and contains at least one typo.