Command Palette
Search for a command to run...
Documentation

Localization & Multi-Language

Edra centralizes all text, placeholders, and UI labels into a single configuration file, making it incredibly easy to translate or connect to your existing i18n solution.


The strings.ts file

When you install Edra via the registry, a file named src/lib/edra/strings.ts is added to your project. This file contains a plain JavaScript object mapping all the text used throughout the editor's UI—including slash commands, tooltips, placeholders, and error messages.

Static Translation

If your application only needs to support one specific language (e.g., Spanish or French), you can directly edit this file and translate the strings manually.


Integrating with i18n Libraries

If you are building a multi-language application using tools like inlang/paraglide-js, svelte-i18n, or typesafe-i18n, you can easily wire them up to Edra.

Since Svelte 5 and many modern i18n tools support reactive functions or stores, you can use JavaScript getters to dynamically return the translated strings. This ensures that when the user switches their language, the editor's UI updates reactively.