---
url: /v7.2.0-SNAPSHOT/guide/essentials/i18n.md
---

# Legacy Text Migration

::: warning Legacy text system removed (as of v7.0.0)
7.0 uses only the `Messages` text system; it does not read, modify, delete or automatically convert 6.x language files.
:::

| 6.x | 7.0 |
| --- | --- |
| `i18n("original sentence")` | Inject `Messages` and call `messages.send(sender, messages.key("a.b"), args…)`. |
| `String.format(i18n(k), x)` | Use a named tag such as `<name>` in the template and pass `Arg.string("name", x)`, or `Arg.number` for a number. |
| `getLanguageCode()` | Inject `LocaleResolver` and call `fallback()` for the server’s fallback `Locale`. Use `Messages` directly for per-recipient text. |
| `supported()`, `@I18n`, `@UltiToolsModule(i18n = …)` | Remove the override or declaration and ship `messages/<locale>.yml`. |
| `lang/<code>.json`, `.yml` or `.yaml` | Ship `messages/<code>.yml` and replace sentence keys with dotted keys. |
| `MessageUtils.sendMessage(...)` | Use `Messages.send(...)`; use `Text.literal(component)` for an existing Adventure component. |
| `@ConfigEntry(comment = "{k}")` | Define `k` in the module’s `messages/<locale>.yml`. If the wording changed, list the old 6.x text in `@ConfigEntry(previousComments = …)` so the framework can replace the old comment. Unrecognized text, including text that only matches a custom 6.x `lang/` file, stays as operator content. See [Module annotation text](/v7.2.0-SNAPSHOT/guide/essentials/messages#module-annotation-text). |

## Removed types and entry points {#removed-text-apis}

* **Message calls:** `UltiToolsPlugin#i18n(String)`, `UltiToolsPlugin#i18n(String, String)`, `UltiTools#i18n(String)`, `UltiTools#i18n(String, String)`, and `MessageUtils`. Use `Messages` as shown above.
* **Language access:** `UltiToolsPlugin#getLanguageCode()`, `UltiToolsPlugin#getConfiguredLanguage()`, `UltiToolsPlugin#getLanguage()`, `UltiTools#getLanguage()`, and `Language`. Use `LocaleResolver#fallback()` when you need the server fallback locale, or `Messages` for per-recipient text.
* **Language declarations:** `Localized` (including `Localized#supported()`), `UltiToolsPlugin#supported()`, `UltiTools#supported()`, `@I18n`, and the `i18n` attribute of `@UltiToolsModule`. Remove the overrides and declarations, and any call to `supported()`, which no longer compiles; ship message catalogues instead.
* **Legacy helpers:** `UltiToolsPlugin#overrideLostPlaceholders(...)`, `FrameworkText`, and `OfficialLanguageFiles`. Use named template arguments instead of repairing old placeholders, and message catalogues and overrides instead of managing legacy language files.

## Existing language files

7.0 no longer loads or extracts legacy `lang/` resources from module JARs. A setting such as `language: zh-myserver` still selects the base language `zh`; it does not load the old custom file.

If legacy directories are found at startup, the framework logs one INFO line. It checks `plugins/UltiTools/lang` and `plugins/UltiTools/pluginConfig/<module>/lang` without recursing, lists up to 20 paths and counts the rest. Copy any revised translations into [override files](/v7.2.0-SNAPSHOT/guide/essentials/messages#operator-overrides). See [Text and languages](/v7.2.0-SNAPSHOT/guide/advanced/upgrading-to-7#messages-migration) for migration steps and [Messages and Languages](/v7.2.0-SNAPSHOT/guide/essentials/messages) for the new API.
