> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edlang/getting-started/placeholders.md).

# Placeholders

Two forms, usable anywhere a player sees text:

| Form                       | Example                               | Notes                                                            |
| -------------------------- | ------------------------------------- | ---------------------------------------------------------------- |
| `%lang_<key>%`             | `%lang_shop.title%`                   | The EdLang 1 form, always on. Also a PlaceholderAPI placeholder. |
| `{lang:<key>}`             | `{lang:shop.title}`                   | The short form.                                                  |
| `{lang:<key>\|a\|b}`       | `{lang:shop.bought\|{item}\|{price}}` | With arguments: `{0}`, `{1}`... in the value take them.          |
| `{lang:<key>\|name=value}` | `{lang:join\|player={player}}`        | A named argument: `{player}` in the value takes it.              |

```yaml
# lang/en/server/messages.yml
shop:
  bought: '&7You bought &f{0} &7for &a${1}&7.'
join: '&e{player} joined the game'
```

## Arguments

* Arguments are filled in **after** the plugin that sends the text has replaced its own tokens and PlaceholderAPI placeholders, so `{lang:shop.bought|{item}|{price}}` in a shop plugin's config shows the real item and price.
* An argument keeps its own colours; the value's colour continues after it.
* An argument may be another placeholder: `{lang:crates.opened|{lang:crates.vote.name}|{reward}}`.
* Inside an argument, write `\|`, `\}` and `\\` for a literal `|`, `}` and `\`.
* Positional and named arguments can be mixed; a named one also counts as its position.
* Arguments only exist in the short form; `%lang_key%` has none.

## The word `lang`

`placeholders.short-format.name` changes the word: `name: t` gives `{t:shop.title}`. `short-format.enabled: false` turns the short form off (only `%lang_key%` is replaced then). Letters, digits, `_` and `-` only.

## Unknown keys

A placeholder whose key no language has is left exactly as written, so it shows in game and in `/edlang missing <code>`.

## Where they work

* **Everywhere players see text**, through the [packet translator](/p/edlang/features/packet-translator.md) (needs PacketEvents).
* In PlaceholderAPI-aware plugins, `%lang_key%` is also a [PlaceholderAPI placeholder](/p/edlang/features/placeholderapi.md).
* In plugins that use the [API](/p/edlang/reference/developer-api.md) or a LangHook.

## Players can't type them

A player who types `{lang:...}` or `%lang_...%` in chat, a command, a sign, a book or an anvil sees it as typed: EdLang puts an invisible character inside it (`protect-player-input`). Players with `edlang.bypass.input` (ops) may type working placeholders, e.g. to test a key with `/broadcast`.
