Nepali (; Devanagari: नेपाली, [ˈnepali]) is an Indo-Aryan language of the sub-branch of Eastern Pahari. It is the official language of Nepal and one of the 22 scheduled languages of India. Also known by the endonym Khas kura (Devanagari: खस कुरा), the language is also called Nepalese, Gorkhali or Parbatiya in some contexts. It is spoken mainly in Nepal and by about a quarter of the population in Bhutan. In India, Nepali has official status in the state of Sikkim and in the Darjeeling District and Kalimpong district of West Bengal. It has a significant number of speakers in the states of Arunachal Pradesh, Assam, Himachal Pradesh, Manipur, Mizoram and Uttarakhand. It is also spoken in Myanmar and by the Nepali diaspora worldwide. Nepali developed in proximity to a number of Indo-Aryan languages, most notably the other Pahari languages and Maithili and shows Sanskrit influence. However, owing to Nepal's location, it has also been influenced by Tibeto-Burman languages. Nepali is mainly differentiated from Central Pahari, both in grammar and vocabulary, by Tibeto-Burman idioms owing to close contact with this language group.
Nepali developed a significant literature within a short period of a hundred years in the 19th century. This literary explosion was fuelled by Adhyatma Ramayana; Sundarananda Bara (1833); Birsikka, an anonymous collection of folk tales; and a version of the ancient Indian epic Ramayana by Bhanubhakta Acharya (d. 1868). The contribution of trio-laureates Lekhnath Paudyal, Laxmi Prasad Devkota, and Balkrishna Sama took Nepali to the level of other world languages. The contribution of expatriate writers outside Nepal, especially in Darjeeling and Varanasi in India, is also notable.
According to the 2011 national census, 44.6% of the population of Nepal speaks Nepali as the first language. and 32.8% speak Nepali as a second language. The Ethnologue reports 12,300,000 speakers within Nepal (from the 2011 census).
Nepali is traditionally spoken in the hilly regions of Nepal. The language is prominently used in governmental usages in Nepal and is the everyday language of the local population. The exclusive use of Nepali in the court system and by the government of Nepal is being challenged. Gaining recognition for other languages of Nepal was one of the goals of the decades-long Maoist insurgency in Nepal.
In Bhutan, native Nepali speakers, known as Lhotshampa, are estimated at about 35%  of the population. This number includes displaced Bhutanese refugees, with unofficial estimates of the ethnic Bhutanese refugee population as high as 30 to 40%, constituting a majority in the south (about 242,000 people).
The oldest discovered inscription in the Nepali language is believed to be the Dullu Inscription, which is believed to have been written around the reign of King Bhupal Damupal around the year 981 CE. It is believed that the language bore a lot of similarities with other Northwest Indian languages like Punjabi, Sindhi and Lahnda. It's believed that there is some mention of the Khasa language in texts like Manusmriti, Rajatarangini and the Puranas. The Khashas were documented to have ruled over a vast territory comprising what is now western Nepal, parts of Garhwal and Kumaon in northern India, and some parts of southwestern Tibet. King Ashoka Challa (1255–78 CE) is believed to have proclaimed himself Khasha-Rajadhiraja (emperor of the Khashas) in a copper-plate inscription found in Bodh Gaya, and several other copper-plates in the ancient Nepali language have been traced back to the descendants of the King.
The currently popular variant of Nepali is believed to have originated around 500 years ago with the mass migration of a branch of Khas people from the Karnali-Bheri-Seti eastward to settle in lower valleys of the Karnali and the Gandaki basin that were well-suited to rice cultivation. Over the centuries, different dialects of the Nepali language with distinct influences from Sanskrit, Maithili, Hindi and Bengali are believed to have emerged across different regions of the current-day Nepal and Uttarakhand, making Khasa the lingua franca.
However, the institutionalisation of the Nepali language is believed to have started with the Shah kings of Gorkha Kingdom, in the modern day Gorkha district of Nepal. In 1559 AD, a prince of Lamjung, Dravya Shah established himself on the throne of Gorkha with the help of local Khas and Magars. He raised an army of khas people under the command of Bhagirath Panta. Later, in the late 18th century, his descendant, Prithvi Narayan Shah, raised and modernised an army of Chhetri, Thakuri, Magars and Gurung people among others and set out to conquer and consolidate dozens of small principalities in the Himalayas. Since Gorkha had replaced the original Khas homeland, Khaskura was redubbed Gorkhali "language of the Gorkhas".
One of the most notable military achievements of Prithvi Narayan Shah was the conquest of Kathmandu Valley. This region was called Nepal at the time. After the overthrowing of the Malla rulers, Kathmandu was established as Prithvi Narayan's new capital.
The Khas people originally referred to their language as Khas kurā ("Khas speech"), which was also known as Parbatiya (or Parbattia or Paharia, meaning language of the hill country). The Newar people used the term "Gorkhali" as a name for this language, as they identified it with the Gorkhali conquerors. The Gorkhalis themselves started using this term to refer to their language at a later stage. The census of India prior to independence used the term Naipali at least from 1901 to 1951, the 1961 census replacing it with Nepali.
Expansion – particularly to the north, west, and south – brought the growing state into conflict with the British and the Chinese. This led to wars that trimmed back the territory to an area roughly corresponding to Nepal's present borders. After the Gorkha conquests, the Kathmandu valley or Nepal became the new center of politics. As the entire conquered territory of the Gorkhas ultimately became Nepal, in the early decades of the 20th century, Gorkha language activists in India, especially Darjeeling and Varanasi, began petitioning Indian universities to adopt the name 'Nepali' for the language. Also in an attempt to disassociate himself with his Khas background, the Rana monarch Jung Bahadur Rana decreed that the term Gorkhali be used instead of Khas kurā to describe the language. Meanwhile, the British Indian administrators had started using the term "Nepal" to refer to the Gorkha kingdom. In the 1930s, Nepal government also adopted this term fully. Subsequently, the Khas language came to be known as "Nepali language".
Dialects of Nepali include Acchami, Baitadeli, Bajhangi, Bajurali, Bheri, Dadeldhuri, Dailekhi, Darchulali, Darchuli, Doteli, Gandakeli, Humli, Purbeli, and Soradi. These dialects can be distinct from standard Nepali. Mutual intelligibility between Baitadeli, Bajhangi, Bajurali (Bajura), Humli, and Acchami is low.
In the section below Nepali is represented in Latin transliteration using the IAST scheme and IPA. The chief features are: subscript dots for retroflex consonants; macrons for etymologically, contrastively long vowels; h denoting aspirated plosives. Tildes denote nasalised vowels.
Nepali has ten diphthongs: /ui̯/, /iu̯/, /ei̯/, /eu̯/, /oi̯/, /ou̯/, /ʌi̯/, /ʌu̯/, /ai̯/, and /au̯/.
[j] and [w] are nonsyllabic allophones of [i] and [u], respectively. Every consonant except [j], [w], and /ɦ/ has a geminate counterpart between vowels. /ɳ/ and /ʃ/ also exist in some loanwords such as /baɳ/ बाण "arrow" and /nareʃ/ नरेश "king", but these sounds are sometimes replaced with native Nepali phonemes.
Final schwas may or may not be preserved in speech. The following rules can be followed to figure out whether or not Nepali words retain the final schwa.
1) Schwa is retained if the final syllable is a conjunct consonant. अन्त (anta, 'end'), सम्बन्ध (sambandha, 'relation'), श्रेष्ठ (śreṣṭha, 'greatest'/a last name).
Exceptions: conjuncts such as ञ्च ञ्ज in मञ्च (mañc, 'stage') गञ्ज (gañj, 'city') and occasionally the last name पन्त (panta/pant).
2) For any verb form the final schwa is always retained unless the schwa-cancelling halanta is present. हुन्छ (huncha, 'it happens'), भएर (bhaera, 'in happening so; therefore'), गएछ(gaecha, 'he apparently went'), but छन् (chan, 'they are'), गईन् (gain, 'she went').
Meanings may change with the wrong orthography: गईन (gaina, 'she didn't go') vs गईन् (gain, 'she went').
3) Adverbs, onomatopoeia and postpositions usually maintain the schwa and if they don't, halanta is acquired: अब (aba 'now'), तिर (tira, 'towards'), आज (āja, 'today') सिम्सिम (simsim 'drizzle') vs झन् (jhan, 'more').
4) Few exceptional nouns retain the schwa such as: दुख(dukha, 'suffering'), सुख (sukha, 'pleasure').
Note: Schwas are often retained in music and poetry to facilitate singing and recitation.
Nepali is an SOV (subject–object–verb) language. There are three major levels or gradations of honorific: low, medium and high. Low honorific is used where no respect is due, medium honorific is used to signify equal status or neutrality, and high honorific signifies respect. There is also a separate highest level honorific, which was used to refer to members of the Royal family, and by the Royals among themselves.
The following is a sample text in Nepali, of the Article 1 of the Universal Declaration of Human Rights:धारा १. सबै व्यक्तिहरू जन्मजात स्वतन्त्र हुन् ती सबैको समान अधिकार र महत्व छ। निजहरूमा विचार शक्ति र सद्विचार भएकोले निजहरूले आपसमा भातृत्वको भावनाबाट व्यवहार गर्नु पर्छ।
The numbering system has roots in Vedic numbering system, found in the ancient scripture of Ramayana.