The Thai script is used primarily for writing the Thai language, as well as Northern Thai, Northeastern Thai, Southern Thai, and Thai Song, which are separate languages. It is also used to write a number of minority languages in Thailand, Laos and China, as well as Pali, which is widely used in Buddhist temples and monasteries. Both the Thai language and script are closely related to Laotian. The script is of Indic origin, derived from Old Khmer.
The Thai script is an abugida that reads from left to right. The relationship between letters and sounds is complex; 44 letters are used to represent 21 consonant phonemes. This is largely due to the way in which the language's sound system has changed over time. Some sounds used to be distinctive - that is, they used to differentiate between otherwise identical words - but these distinctions have now become obsolete. However, the sounds continue to be written using different letters. In addition, Thai vocabulary has been borrowed from Sanskrit, Pali, Old Khmer, English and Teochew Chinese, and it is often necessary to know the origin of the word in order to spell it correctly.
Consonants contain an inherent vowel, either [a] or [o], which can be modified by means of vowel diacritics. Words in which a consonant is pronounced without a vowel are written with a symbol called a virama, which mutes the inherent vowel. There are no independent letters to represent syllable-initial vowels; syllables which are pronounced with an initial vowel are written with a glottal stop and the appropriate vowel diacritic is joined to it.
Tone is represented partly by qualities inherent in the consonant symbol, partly by the structure of the syllable and partly by tone marks.
Word breaks are not indicated by spaces, rather, spaces are used to separate clauses or sentences. A Latin comma and full stop are sometimes used, but not by everybody. There also used to be a symbol (now obsolete) for separating paragraphs. Additional non-alphabetic symbols include an abbreviation marker, a symbol to indicate that a word or letter is repeated, a symbol to indicate that a letter is not pronounced, and a letter equivalent in meaning to the English abbreviation 'etc.'. Thai digits from 0-9 are used; these are almost identical to Khmer digits. Latin numerals are also used.
Please note that, although orthographically the Thai script does exhibit reordering behaviour, that reordering is not typically reflected in software implementations. See Reordering and Data Storage Order for more details of this.