# Latvian orthography

The modern Latvian orthography is based on Latin script adapted to phonetic principles, following the pronunciation of the language. The standard alphabet consists of 33 letters – 22 unmodified Latin letters and 11 modified by diacritics. It was developed by the Knowledge Commission of the Riga Latvian Association in 1908, and was approved the same year by the orthography commission under the leadership of Kārlis Mīlenbahs and Jānis Endzelīns. It was introduced by law from 1920 to 1922 in the Republic of Latvia.
Latvian orthography historically used a system based upon German phonetic principles, while the Latgalian dialect was written using Polish orthographic principles.

## Alphabet

The modern Latvian standard alphabet consists of 33 letters, 22 unmodified letters of the Latin alphabet and additional 11 modified by diacritics.
Majuscule forms (also called uppercase or capital letters) :
| A | Ā | B | C | Č | D | E | Ē | F | G | Ģ | H | I | Ī | J | K | Ķ | L | Ļ | M | N | Ņ | O | P | R | S | Š | T | U | Ū | V | Z | Ž |
| Minuscule forms (also called lowercase or small letters) |||||||||||||||||||||||||||||||||
| a | ā | b | c | č | d | e | ē | f | g | ģ | h | i | ī | j | k | ķ | l | ļ | m | n | ņ | o | p | r | s | š | t | u | ū | v | z | ž |
| Names of Letters |||||||||||||||||||||||||||||||||
| a | garais ā | bē | cē | čē | dē | e | garais ē | ef | gā | ģē | hā | i | garais ī | jē | kā | ķē | el | eļ | em | en | eņ | o | pē | er | es | eš | tē | u | garais ū | vē | zē | žē |
The vowel letters A, E, I and U can take a macron to show length, unmodified letters being short.
The letters C, S and Z, which in unmodified form are pronounced [ts], [s] and [z] respectively, can be marked with a caron. These marked letters, Č, Š and Ž are pronounced [tʃ], [ʃ] and [ʒ] respectively.
The letters Ģ, Ķ, Ļ and Ņ are written with a cedilla or a small comma placed below (or, in the case of the lowercase g, above). They are modified (palatalized) versions of G, K, L and N and represent the sounds [ɟ], [c], [ʎ] and [ɲ] respectively.
In alphabetical sorting, the letters Č, Š, Ž, Ģ, Ķ, Ļ and Ņ are collated separately from their unmodified counterparts, but Ā, Ē, Ī, and Ū are usually collated as plain A, E, I, U.
The letters F and H appear only in loanwords. However, they are common enough in modern Latvian, more common than Ž, Ģ, Ķ, or Č.

### Obsolete letters

Historically the letters CH, Ō and Ŗ were also used in the Latvian alphabet. The last of these stood for the palatalized dental trill /rʲ/ which is still used in some dialects (mainly outside Latvia) but not in the standard language, and hence the letter Ŗ was finally removed from the alphabet on 5 June 1946, when the Latvian SSR legislature passed a regulation that officially replaced it with R in print. A spelling reform replacing Ŗ with R, CH with H, and Ō with O, was enacted in 1938, but then Ŗ and CH were reinstated in 1939, Ō was reinstated in 1940, Ŗ and Ō were finally removed in 1946 and CH was finally removed in 1957.
The letters CH, Ō and Ŗ continue to be used in print throughout most of the Latvian diaspora communities, whose founding members left their homeland before the post-World War II Soviet-era language reforms. An example of a publication in Latvia today, albeit one aimed at the Latvian diaspora, that uses the older orthography—including the letters CH, Ō and Ŗ—is the weekly newspaper Brīvā Latvija.

### Latgalian alphabet

The Latgalian language (variously considered a separate language or a dialect of Latvian) adds two extra letters to this standard set: Ō and Y.

## Spelling of foreign names

Writing of Latvian names always conform to the highly phonetic Latvian orthography and highly fusional Latvian grammar, and, in the case of foreign-born Latvian nationals or marriages between Latvian women and foreigners (whence they assume the family name of their husband), the foreign names are modified to conform to the phonetic spelling and to acquire the respective case ending. For example, Gerard Depardieu is Žerārs Depardjē, Joaquin Phoenix is Hoakins Fīnikss and Donald Trump is Donalds Tramps.
This has given rise to at least half a dozen lawsuits over the last couple decades, mostly ethnic Russian Latvian nationals not content with addition of case endings. Other examples include:
* a Latvian woman contesting her foreign husband's name being transcribed phonetically in her documents (Mentzen alias Mencena v. Latvia case) where the plaintiffs were turned down
* legal proceedings by a Latvian couple to allow them to register their child as Otto (instead of Oto)
* a claim filed with UN HRC by a Latvian national of Russian-Jewish Leonid Raihman whose claims were upheld.

## Q, W, X, and Y

The Latvian alphabet lacks Q (kū [kuː]), X (iks [iks]) and Y (igrek [igrek]) of the ISO basic Latin alphabet. They are only used in foreign words and expressions and in international symbols. The letter "Y" is also used in the Latgalian language/dialect.
The Latvian alphabet also lacks the letter W (dubultvē [dubultveː]), which, along with the above scenarios, is used in older texts. It was used for the "v" sound in the German-based orthography, until the 20th century when the old orthography was replaced by the new orthography, in which the letter "W" was replaced by "V".
While the letters ⟨q⟩, ⟨w⟩, ⟨x⟩, and ⟨y⟩ are used in some forms of the Latvian keyboard, they are rarely used in Latvian. They occur in specific unassimilated foreign words and expressions (e.g. Latin terms (status quo), musical terms (tranquillo), and recent borrowings (queer; usually spelled kvīrs)). An example of an unassimilated borrowing in Latvian that uses one of these letters is Brexit (also spelled breksits). They are replaced by "k(v)/h", "v", "ks", and "i"/"j" respectively (e.g. nikābs, kvarcs, kvarks, hidrohinons, viskijs, vindsērfs, vafele, ekstra, oksimorons, eksosfēra, jeti, joga, itrijs, etc.) in assimilated loanwords. However, they are used in international symbols, such as:
* x and y as unknowns or variables in mathematics;
* X as a Roman numeral for 10;
* W and Bq as physical units (however, when written in full, the words are written using Latvian letters: vats, bekerels);
* Q, Y, y, q as metric prefixes (when written in full, the prefixes are written using Latvian letters: kveta-, jota-, jokto-, kvekto-);
* W, Xe, Y as symbols of chemical elements (when written in full, the words are written using Latvian letters: volframs, ksenons, itrijs).
Despite this, these letters are not used in Latvian for writing foreign personal and geographical names; instead they are adapted to Latvian phonology, orthography, and morphology, e. g. Džordžs Volkers Bušs (George Walker Bush), but brand names are often written in their original spelling (e.g. Pixar).

## Sound–spelling correspondences

Latvian has a phonetic spelling. There are only a few exceptions to this:
* The letter E and its long variation Ē, which are used to write two sounds that represent the short and long versions of either [ɛ] or [æ] respectively: ēdu (/ɛː/, I ate) vs. ēdu (/æː/, I eat) and dzer (/ɛ/, 2sg, you drink) vs. dzer (/æ/, 3sg, s/he drinks)
* The letter O indicates both the short and long [ɔ], and the diphthong [uɔ̯]. These three sounds are written as O, Ō and Uo in Latgalian, and some Latvians campaign for the adoption of this system in standard Latvian. However, the majority of Latvian linguists argue that o and ō are found only in loanwords, with the Uo sound being the only native Latvian phoneme. The digraph Uo was discarded in 1914, and the letter Ō has not been used in the standard orthography since 1946. Example: robots [o] (a robot, noun) vs. robots [uo] (toothed; adjective); tols [o] (tolite; noun) vs tols [uo] (hornless; adjective).
* Also, Latvian orthography does not distinguish intonation homographs: sējums [ē] (crops) vs sējums [è] (book edition), tā (that, feminine) vs tā (this way, adverb).
* Positional sound changes are not indicated in writing. These include: consonant assimilation (bs>ps, cd>dzd, sč>šč, etc.), simplifying word-final consonant clusters (ts>c, šs>š), pronouncing word-final or pre-consonantal combinations "vowel+'j'" and "vowel+'v'" as diphthongs (aj>ai, av>au), prolonging voiceless obstruents between vowels (apa>appa). In these cases, the spelling of morphemes remains the same as in other environments: labs 'good', piecdesmit 'fifty', pusčetri 'half past three', svešs 'strange', tavs 'your', lapa 'leaf'.
Latvian orthography also uses digraphs Dz, Dž and Ie.
Vowels :
| Grapheme | IPA | English approximation |
| a | ɑ | like father, but shorter |
| ā | ɑː | car |
| e | e | elephant |
| e | æ | map |
| ē | eː | similar to play |
| ē | æː | like bad, but longer |
| i | i | Between it and eat |
| ī | iː | each |
| o | [uɔ̯] | tour (some dialects) |
| o | o | not (some dialects) |
| o | oː | though; boat |
| u | u | between look and Luke |
| ū | uː | you |
Consonants :
| Grapheme | IPA | English approximation |
| b | b | brother |
| c | t̪͡s̪ | like cats, with the tongue touching the teeth |
| č | t͡ʃ | chair |
| d | d̪ | like door, with the tongue touching the teeth |
| dz | d̪͡z̪ | like lids, with the tongue touching the teeth |
| dž | d͡ʒ | jog |
| f | f | finger |
| g | ɡ | gap |
| ģ | ɟ | between duty (without yod-dropping) and argue |
| h | x | loch (Scottish English) |
| j | j | yawn |
| k | k | cat |
| ķ | c | between stupid (without yod-dropping) and skew |
| l | l | lamp |
| ļ | ʎ | similar to William |
| m | m | male |
| n | n̪, ŋ | like nail, with the tongue touching the teeth, or sing |
| ņ | ɲ | jalapeño |
| p | p | peace |
| r | r, [rʲ] | rolled r, like Spanish perro or Scottish English curd |
| s | s̪ | like sock, with the tongue touching the teeth |
| š | ʃ | shadow |
| t | t̪ | like table, with the tongue touching the teeth |
| v | v | vacuum |
| z | z̪ | like zebra, with the tongue touching the teeth |
| ž | ʒ | vision |

## Old orthography

The old orthography was based on that of German and did not represent the Latvian language phonemically. At the beginning it was used to write religious texts for German priests to help them in their work with Latvians. The first writings in Latvian were chaotic: there were as many as twelve variations of writing Š. In 1631 the German priest Georg Mancelius tried to systematize the writing. He wrote long vowels according to their position in the word — a short vowel followed by h for a radical vowel, a short vowel in the suffix and vowel with a diacritic mark in the ending indicating two different accents. Consonants were written following the example of German with multiple letters. The old orthography was used until the 20th century when it was slowly replaced by the modern orthography.
* Newspaper advertisement, ca. late 19th or early 20th c., showing the use of German script and German-influenced orthography
* 19th-century Latvian alphabet (upper)
* Rules of the spelling reform of 1921

## Knot writing system

Latvian was also traditionally written using a knot system known as mezglu raksti [lv]. One or two threads of differently colored yarn would be tied in knots and wound onto a peg, which created a ball that was unraveled to read the full message. This system was mostly used for recording folk songs or for textile patterns. The system became lost and died out, but lived on with some older individuals until the 20th century.

## Computer encoding

Lack of software support of diacritics has caused an unofficial style of orthography, often called translit, to emerge for use in situations when the user is unable to access Latvian diacritic marks on the computer or using cell phone. It uses only letters of the ISO basic Latin alphabet, and letters not used in standard orthography are usually omitted. In this style, diacritics are replaced by digraphs:
* ā, ē, ī, ū — aa, ee, ii, uu
* ļ, ņ, ģ, ķ — lj, nj, gj, kj
* š — sh (as well as ss, sj, etc.)
Some people may find it difficult to use such methods and either write without any indication of missing diacritic marks or use digraphs only if the diacritic mark in question would make a semantic difference. There is yet another style, sometimes called "Pokémonism" (In Latvian Internet slang "Pokémon" is derogatory for adolescent), characterised by use of some elements of leet, use of non-Latvian letters (particularly w and x instead of v and ks), use of c instead of ts, use of z in endings, and use of mixed case.
The IETF language tags have registered a subtag for the old orthography (lv-vecdruka, lv-Latf-vecdruka for Fraktur)

### Keyboard

Standard QWERTY computer keyboards are used for writing in Latvian; diacritics are entered by using a dead key (usually ' or `). Some keyboard layouts use the AltGr modifier key, usually placed immediately to the right of the space bar (most notable of such is the Windows 2000 and XP built-in Latvian QWERTY layout).
On macOS, diacritics can be entered by holding down the ⌥ Option key followed by the respective letters from their unaccented counterparts (including the obsolete letters):
* ⌥ Option+A → ā
* ⌥ Option+C → č
* ⌥ Option+E → ē
* ⌥ Option+G → ģ
* ⌥ Option+I → ī
* ⌥ Option+K → ķ
* ⌥ Option+L → ļ
* ⌥ Option+N → ņ
* ⌥ Option+O → ō
* ⌥ Option+R → ŗ
* ⌥ Option+S → š
* ⌥ Option+U → ū
* ⌥ Option+Z → ž
In the early 1990s, the Latvian ergonomic keyboard layout was developed. Although this layout may be available with language support software, it has not become popular due to lack of keyboards with such a configuration.