# Allow users to translate plugins

**URL:** <https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437>\
**Category:** Feature archive\
**Tags:** ui-ux\
**Created:** [June 28, 2024, 10:02am UTC](https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437 "2024-06-28T10:02:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mutzu](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mutzu/32/59643_2.png) [@Mutzu](https://forum.obsidian.md/u/Mutzu)\
**Post date:** [June 28, 2024, 10:02am UTC](https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437/1 "2024-06-28T10:02:49Z")

</div>

### Use case or problem

There are a lot of plugins out there, and it would take a lot of (unrealistic) effort for developers to translate their plugins into every language that Obsidian provides.

### Proposed solution

Allow users to translate/localize the plugins they have installed.

Add a table in the settings where the users can translate the texts for their installed plugins.

This shouldn’t require any changes to the current code of any plugin.

#### Optional

There could be a new API function for future plugins to add texts to the translation table for _texts that aren’t shown in the UI (DOM tree)._

```auto
addToDictionary(plugin: Plugin, textID: string); // Adds text that can be translated
dict = getDictionary(plugin: Plugin); // Returns the dictionary for the plugin
dict["textID"] // Returns localized text or default English text equal to textID if there is no translation

```

#### Optional:

There could be a **“Send to Obsidian”** button to send the translation to the Obsidian server. Then Obsidian could manage the translations in a download list within the settings with kudos from other users.

(The downloaded text needs to be sanitized to avoid code injections.)

### Current workaround

Probably by changing the UI texts in the JavaScript files in the .plugins folder. But when a plugin gets an update its files get overwritten.

Perhaps it’s better to change the UI texts during runtime.

### Related feature requests

> [@Translation of plugins to other languages](https://forum.obsidian.md/t/translation-of-plugins-to-other-languages/15715):
>
> I asked Liam the “Calendar” plugin developer to support other languages and he replied: “I would love to see settings and dialogs get translated! I’ll check with the Obsidian devs to see there’s anything they can expose via the API to help with plugin localization.” I think this would be a valuable feature. /Henrik slight_smile

---

<div class="post-metadata">

**Author:** ![joethei](https://forum.obsidian.md/user_avatar/forum.obsidian.md/joethei/32/11969_2.png) [@joethei](https://forum.obsidian.md/u/joethei)\
**Post date:** [June 28, 2024, 10:44am UTC](https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437/2 "2024-06-28T10:44:48Z")

</div>

What is translated and what is not translated is something for plugin devs to manage themselves.  
They can implement an i18n library/code snippet to manage the translation files and ask for pull requests.  
We could maybe provide some helper functions though, like the linked thread asks for.

Your proposed solution won’t work, not all the strings in a plugin should be translated, and changing text at runtime is hacky.  
The second optional feature is not something we will implement.

---

<div class="post-metadata">

**Author:** ![Mutzu](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mutzu/32/59643_2.png) [@Mutzu](https://forum.obsidian.md/u/Mutzu)\
**Post date:** [June 28, 2024, 3:50pm UTC](https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437/3 "2024-06-28T15:50:40Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [July 26, 2024, 3:51pm UTC](https://forum.obsidian.md/t/allow-users-to-translate-plugins/84437/4 "2024-07-26T15:51:27Z")

</div>

Closed on July 26, 2024, 3:51pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
