# Per player localization

`messages.yml` is now `messages_en.yml` and you can create more using proper language codes like `messages_de.yml` for german.

Examples: `en-US`, `en-UK`, `en`, `de`, `sk`, `hu` In this file, you can add a new section, named `custom` (which is already there if you do a fresh install:

```yml
custom:
  stash-title: Item stash
  prev-page: '&fPrevious Page'
  npc:
    quests: <white>Quests
```

These values are available in the plugin menus like item stash. You can reference them as `{{stash-title}}` or `{{npc.quests}}`. Notice the dot (**.**) notation for nested structures.

These are also exposed as PlaceholderAPI placeholders: `%aurora_lang_<key>%` for example: `%aurora_lang_npc.quests%`

This allows you to add per player localization to any plugin that supports PlaceholderAPI placeholders.

### **To enable per player localiaztion**:&#x20;

In your config.yml you have to:

* add the language codes you support in `supported-languages`
* choose your default language and set it to `locale` field
* set `use-per-player-locale` to `true` &#x20;

And then you have to:

* grant the `aurora.core.user.language` to the players so they have access to the `/language command` After all these, players will be able to use their desired language.

Notice that in `config.yml` the `number-format` section also have a `locale` value. That is only used when per player locale is disabled, otherwise it will use the player's selected locale.

Default value of the `custom` section in the migrated `messages_en.yml` file

```yaml
custom:
  stash-title: "Item stash"
  prev-page: "&fPrevious Page"
  prev-page-lore: "&7Click to go to the previous page"
  next-page: "&fNext Page"
  next-page-lore: "&7Click to go to the next page"
  current-page: "&fCurrent Page &7({current}/{max})"
  current-page-lore: "&7You are currently on page {current}"
  stash-collect-all: "&aCollect all"
  stash-collect-all-lore: "&7Click to collect all items"
  close: "&cClose"
  close-lore: "&7Click to close the menu"
```

As you can see, these are values for the stash menu. The updated default config that uses these values can be viewed on:

{% content-ref url="/pages/D1eiAMF2ldvZjdLug9nH" %}
[Item stash](/aurora/item-stash.md)
{% endcontent-ref %}

If you want to use these placeholders in menus, there is a handy utility in AuroraLib which lets you wrap lines by word count in any of the item lore options:

```yaml
some-menu-item:
  name: "{{my-item-name-language-placeholder}}"
  slot: 1
  lore:
    - "[wrap:25] {{my-item-lore-language-placeholder}}"
```

You can nest plugin placeholders like `{name}` , papi placeholders like `%player_name%` and language placeholders like `{{language-placeholder}}` in any depth.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auroramc.gg/aurora/per-player-localization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
