ราชาศัพท์ raa-chaa-sàp itself is a Pali-derived word, ราชา raa-chaa (राज rājā "king, monarch") + ศัพท์ sàp (originally from Sanskrit शब्द śabda "word"); hence, "Royal Language". However, it is commonly interpreted in modern Thai culture as referring to the whole honorific system of modern Thai, although strictly speaking it refers to royal honorifics, both speaking to and speaking about the royal family.
Cultural borrowings between Thai and Khmer are extremely well known, with two-way interchange connected to the history of the peoples around the Chao Phraya River Valley, and especially when it came to royal culture. As one scholar put it:
For centuries, Khmer and Thai existed in veritable symbiosis.
Putting this into a greater liturgical context of Theravada Buddhism, with the liturgical language being Sanskrit and Pali, we see an extra layer of honorificity and formality in the Thai language, what can be called clerical honorifics.
Interestingly, old Tai Lü (Tai Lue) manuscripts (written in Tai Tham script) do not show evidence of royal honorifics, even though they date from a similar period with the Sukhothai Thai language manuscripts from the 13th century CE. Rather, we see the rise of ราชาศัพท์ raa-chaa-sàp, in the early Ayutthaya era (from the Gregorian Year 1351 onwards) as the "court language", and was officially enshrined in the Law of the Civil Hierarchy by King Baromtrailokanat.
However, indications that there was a "court language" even in the time of the Sukhothai, as seems to be evident in the writings of Maha Thammaracha I as Li Thai. On the other hand, there is no evidence of it in the inscriptions of Ramkhamhaeng.
The honorific systems in Thai, Khmer, Tibetan and also Javanese are principally based on lexical substitution; the substitutions here are much more extensive in the vocabulary than the few substitutions in the primarily morphological honorific systems in e.g. Japanese and Korean. Different items of vocabulary are used to refer to various registers, and often whole turns of phrase are reworded to be more appropriate to the sociolinguistic register.
E.g. for "to sleep":
- นอน nɔɔn (inherited from Proto-Tai)
- จำวัด jam-wát (Khmer-based compound, lit. "confine in a temple")
- ผทม/บรรทม/ประทม pà-tom/ban-tom/bprà-tom (from Old Khmer; in modern Khmer ផ្ phtum is also part of "royal language")