Skip to content

Add no-translate plugin to prevent Google Translate from translating proper nouns - #2213

Closed
kaankacar wants to merge 3 commits into
mainfrom
2191-adding-a-no-translate-list-to-the-docs
Closed

kaankacar wants to merge 3 commits into
mainfrom
2191-adding-a-no-translate-list-to-the-docs

Conversation

@kaankacar

Copy link
Copy Markdown
Contributor

This PR introduces a new plugin to the Docusaurus configuration that automatically prevents specific technical terms and brand names from being translated by Google Translate. The main change is the addition of the no-translate plugin, which scans the page content and wraps designated words in a notranslate span to ensure they retain their original form across all site pages.

New plugin integration:

  • Added ./src/plugins/no-translate/index.ts to the plugins array in docusaurus.config.ts, enabling the plugin for the documentation site.

No-translate functionality:

  • Implemented noTranslatePlugin in src/plugins/no-translate/index.ts to automatically wrap words like Stellar, Soroban, Horizon, Rust, and XLM in a notranslate span, preventing translation by Google Translate. The plugin injects a script that processes text nodes on page load and after SPA navigation events.

Closes #2191

@kaankacar kaankacar linked an issue Jan 27, 2026 that may be closed by this pull request
@ElliotFriend

Copy link
Copy Markdown
Contributor

a particular example is in Hindi, the rough translation of Rust on Stellar is something to the affect of war on Stellar

@kaankacar kaankacar closed this Feb 2, 2026
@kaankacar
kaankacar deleted the 2191-adding-a-no-translate-list-to-the-docs branch February 2, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants