# Part 1 · Languages and regions

## 1.1 Choosing your language and time zone

**Who** · Anyone with an account.

**Where** · The menu under your name › **Language and region**.

**Before you start** · Nothing. Only languages the platform has switched on are offered.

**The steps**
1. **Language**: choose one, or **Use the workspace's** to follow your workspace's.
2. **Time zone**: type a few letters of a city (`Tokyo`, `Accra`) and choose it, or **Use the workspace's**.
3. **How things look** shows a date, a time, a number and money as you will see them.
4. Press **Save changes**. The page opens again in your language.

**What the record shows** · The audit: `user.updated`, your language and time zone before and after.

**Who is told** · Nobody. E-mails to you come in your language from now on.

**What can go wrong**
- *The language you want isn't offered.* It isn't switched on yet (1.3, 1.4).
- *Times look an hour out.* Choose your city rather than a fixed offset, so summer time follows.

## 1.2 Setting the workspace's language, time zone and currency

**Who** · An Owner or Admin (`setting.manage`). Whoever may only see the settings (`setting.view`) sees them without a
**Save**.

**Where** · **Settings** › **Regional** (the pen), or `/setting/regional`.

**Before you start** · The currency comes from Input Fields' **Currency** list.

**The steps**
1. **Language**, **Time zone** (type to search), **Currency**: all three are required (*).
2. Press **Save changes**, or **Cancel**.

**What the record shows** · The audit: `tenant.updated`, before and after.

**Who is told** · Nobody. Everyone in the workspace who kept "Use the workspace's" reads the app, and gets their
e-mails, in the new language and time zone; money shows in the new currency.

**What can go wrong**
- *Someone still sees another language.* Their own choice wins over the workspace's (1.1).

## 1.3 Switching a language on

**Who** · The Service.

**Where** · **Platform** › **Languages**.

**Before you start** · The language's folder is on the server (1.4).

**The steps**
1. Find the language: its direction, and **Translated** (*1,154 of 1,154*).
2. Press its switch. It is offered only when every word is translated: every key in its folder, every Input Fields
   label and every e-mail template's subject and message.
3. To take it away again, press the switch once more. Anyone who chose it reads the workspace's language instead.

**What the record shows** · The audit: `lookup_value.updated` on the `language` list (the same switch as Input Fields'
**Language** list).

**Who is told** · Nobody.

**What can go wrong**
- *"… isn't complete yet".* A word is missing; **Translated** shows how many. Input Fields labels and templates are
  translated on their own pages.
- *No switch for English.* English is the fallback: always on.

## 1.4 Adding a language

**Who** · The operator, then the Service.

**Where** · The server's `lang/` folder; then Input Fields, Notifications and **Languages**.

**Before you start** · A translator, and the language's code (`fr`, `ar`, `tw`).

**The steps**
1. Copy `lang/en` to `lang/<code>` and translate every file. In `shell.php`, `direction` is `rtl` for a language
   written right to left. Give the language its own name in `lookup.php` (`language.values.<code>`: `Français`).
2. Deploy. `lookups:sync` adds the language to the `language` list, switched off; `notifications:sync` adds the
   templates' words from `notification_template.php`.
3. The Service translates anything the folder doesn't carry (an Input Fields value added on a page, a template changed
   on its page), then switches the language on (1.3).

**What the record shows** · The audit for each label and the switch.

**Who is told** · Nobody.

**What can go wrong**
- *Dates or money in English.* The platform's formats (Intl) don't know the code: the words are the language's, the
  formats English's.
- *A word shows in English once switched on.* It can't: a missing word keeps the switch off.
