> 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/features/placeholderapi.md).

# PlaceholderAPI

With PlaceholderAPI installed, EdLang adds:

| Placeholder                 |                                                                              |
| --------------------------- | ---------------------------------------------------------------------------- |
| `%lang_<key>%`              | The key's value in the player's language.                                    |
| `%rel_lang_<key>%`          | Relational: the key in the **viewer's** language (TAB tab and tag prefixes). |
| `%edlang_code%`             | The player's language code.                                                  |
| `%edlang_name%`             | Its name.                                                                    |
| `%edlang_auto%`             | `true` when it is picked automatically.                                      |
| `%edlang_default%`          | The default language code.                                                   |
| `%edlang_detected%`         | What automatic detection picks for the player.                               |
| `%edlang_chat_translation%` | `true` when the player gets chat translated.                                 |
| `%edlang_count%`            | Languages loaded.                                                            |
| `%edlang_players_<code>%`   | Online players using that language.                                          |
| `%edlang_name_<code>%`      | That language's name.                                                        |

## %lang\_ through PlaceholderAPI or the packet translator?

A plugin that runs PlaceholderAPI fills `%lang_key%` in for the player **it asks about**. For a text only that player sees (their scoreboard, their messages) that is right. For a text several players see (a hologram another plugin builds once with PlaceholderAPI), it would show one language to everyone.

`placeholderapi.resolve-lang-keys: false` makes PlaceholderAPI leave `%lang_key%` as it is, so the packet translator replaces it for each viewer instead. `{lang:...}` is never touched by PlaceholderAPI, so it always goes to the packet translator: use it for shared texts.
