# 🌍 Languages & Translations

## Translations

Every line the plugin can print lives in one file:

```
PhoenixLobby/translations/translations.en.yml
```

Messages to players, command replies, the words the [placeholders](placeholders.md) fall back on and the whole in-game editor are all in there. Edit it, run `/plobby reload`, and the new text is live.

To stop a message from appearing at all, set it to `''` (empty quotes).

> **Info:**
Older versions kept this in **messages.yml**. On the first start after upgrading, the plugin moves your text across on its own and renames the old file to **old_messages.yml**. See [Where did my messages.yml go?](questions-and-answers/where-did-my-messages-file-go.md)

## Prefix

Most messages start with the plugin prefix rather than spelling it out, so it can be changed in one place.

```yaml
en:
  plugin-prefix: '&#3148a9&lPhoenixLobby &8»&7'
```

Anywhere `%prefix%` appears in a message it is replaced with that value, which means renaming the plugin across every message is a single edit.

## Language

The language the plugin loads is set in **config.yml**, or from **Editor > Settings > Language**.

```yaml
language: EN_US
```

<figure><img src="../.gitbook/assets/settings/language.png" alt="" width="563"><figcaption><p>Settings (Language)</p></figcaption></figure>

The picker lists every language the plugin knows about:

| Code    | Language                | Code    | Language                 |
| ------- | ----------------------- | ------- | ------------------------ |
| `EN_US` | English (United States) | `AR_SA` | Arabic                   |
| `PT_BR` | Portuguese (Brazil)     | `PT_PT` | Portuguese (Portugal)    |
| `ES_ES` | Spanish                 | `FR_FR` | French                   |
| `DE_DE` | German                  | `IT_IT` | Italian                  |
| `NL_NL` | Dutch                   | `SV_SE` | Swedish                  |
| `PL_PL` | Polish                  | `CS_CZ` | Czech                    |
| `RU_RU` | Russian                 | `TR_TR` | Turkish                  |
| `EL_GR` | Greek                   | `HI_IN` | Hindi                    |
| `ID_ID` | Indonesian              | `VI_VN` | Vietnamese               |
| `JA_JP` | Japanese                | `KO_KR` | Korean                   |
| `ZH_CN` | Chinese (Simplified)    |         |                          |

> **Warning:**
Only the languages included in the build you are running can be picked. The rest are greyed out in the editor. At the moment the plugin ships with English, so the way to run it in another language is to translate the file yourself.

## Translating the plugin

The file is one flat list of keys, and the value is either a line or a list of lines. Translate the right-hand side and leave the keys and the placeholders alone.

```yaml
en:
  spawn-not-set: '%prefix% Spawn has not been set.'
  spawn-teleportation: '%prefix% You have been teleported to spawn.'
```

Everything sits under the language code at the top of the file, and a value can be a single line or a list of them.

```yaml
en:
  error-processing:
  - '&cAn error occurred while processing this action (Check console):'
  - '&7%message%'
```

Anything wrapped in `%` is filled in by the plugin, so `%prefix%`, `%player%` and `%identifier%` have to survive the translation to keep working. Colour codes can be moved around freely.

> **Info:**
English is always loaded first, and the chosen language is laid over the top of it. A key you have not translated yet falls back to its English line rather than printing blank, so a file can be translated a piece at a time.

> **Info:**
Keep a copy of your translated file before updating the plugin. New keys are added to it automatically, but it is the file your work lives in.

## The editor is translated too

Everything under the `menus.editor` keys is the text of the in-game editor — the name and description of every option. Translating those is optional, and skipping them leaves the editor in English while your players see your language.

Source: https://www.phoenixplugins.com/docs/phoenix-lobby/plugin-information/languages