# Localization The language site is published in four languages. | Locale | Language | Menu label | Text direction | | --- | --- | --- | --- | | `en-US` | English | EN | left to right | | `de-DE` | German | DE | left to right | | `ru-RU` | Russian | RU | left to right | | `he-IL` | Hebrew | HE | right to left | A page has one URL in every language. The language is a preference kept in the browser. ## How a page picks its language The rules are pure functions in `frontend/src/locales.ts`: 1. **The visitor's choice.** A language stored under `tala-locale-choice` in local storage always wins. 2. **The browser.** Without a stored choice, the first entry of `navigator.languages` whose primary language is published is used. `de-AT` selects German, and `iw`, the former code for Hebrew, selects Hebrew. 3. **The fallback.** A browser that prefers no published language gets `en-US`. | Browser languages | Page language | | --- | --- | | `he-IL`, `en-US` | Hebrew | | `de-AT`, `en` | German | | `tr-TR`, `de` | German, the first preference that is published | | `tr-TR`, `fr` | English, the fallback | | none reported | English | ## What counts as a choice A language becomes the stored choice only when a visitor changes it in the menu. - Loading a page never stores anything. A visitor who never used the menu keeps following the browser, also after the browser's language changes. - A change is stored only after the visitor has acted on the page (`navigator.userActivation`). A change that reaches the page before anyone clicked, tapped or typed switches the language but is not remembered. A browser without that API cannot tell, and there a change counts as a choice. Earlier versions wrote the language under `vxs-locale` on every visit, which made a real choice indistinguishable from the former English default. That key is no longer read. The keys once carried the former name of the language: `vxs-locale-choice`, `vxs-theme` and `vxs-forum-theme`. A value stored under one of them moves to `tala-locale-choice`, `tala-theme` or `tala-forum-theme` the first time a page loads, and the former key is removed. ## The forum page The forum notice has no language menu. `forum/site.js` shows its one notice in the first browser language that has a translation and in English otherwise, and stores nothing about language. It keeps its own theme key, `tala-forum-theme`. ## Hebrew and text direction Hebrew does not mirror the page. The layout, the navigation and code keep their left-to-right arrangement; only text follows the language. - The root element carries `data-text-direction="rtl"`, not `dir="rtl"`. - Headings and paragraphs run right to left and align to the right. - Links, buttons and list items take the direction of their own first letter, so a product name on its own still reads left to right. - Code blocks stay left to right. - The onward arrow comes from `forwardArrow` and points left in Hebrew. - A left-to-right mark (`‎`) follows a name that ends in a symbol, such as `C#`, in Hebrew strings. Without it the `#` jumps to the other side of the name inside right-to-left text. The rules are at the end of `frontend/src/styles/site.css` and `forum/site.css`. ## Where the text lives | Text | File | | --- | --- | | header, navigation, footer | `frontend/src/App.vue` | | each page | the `