WP Manifestindependent plugin directory
manifest / i18n / polylang-internal-link-replacer

Polylang Internal Link Replacer WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Polylang Internal Link Replacer plugin

★ 0stars
40release downloads
≈20active sites
v1.1.3latest · 6mo ago

Install

Download polylang-internal-link-replacer-v1.1.3.zip From the v1.1.3 release on GitHub, Apr 7, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/epicwp/polylang-internal-link-replacer/releases/download/v1.1.3/polylang-internal-link-replacer-v1.1.3.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Automatically replaces internal links with their translated versions on page load for WordPress sites using Polylang.

Description

When you have a multilingual WordPress site with Polylang, internal links in your content may still point to the original language version. This plugin automatically detects and replaces these links with their translated equivalents based on the current language.

Features

  • Automatic link replacement - Replaces internal links on-the-fly during page render
  • Multiple content types - Works with post content, navigation menus, and Elementor pages
  • Smart detection - Uses WordPress rewrite rules for accurate URL resolution
  • Preserves URL components - Keeps query parameters and URL fragments intact
  • Language switcher aware - Skips links with hreflang or lang attributes
  • WooCommerce compatible - Excludes account pages to prevent redirect issues

Supported Content

  • Post and page content (the_content filter)
  • Navigation menus (wp_nav_menu_items filter)
  • Elementor frontend content (elementor/frontend/the_content filter)

Requirements

  • WordPress 6.0 or higher
  • PHP 8.1 or higher
  • Polylang (free or Pro)

Installation

Via Composer

composer require epic-wp/polylang-internal-link-replacer

Manual Installation

  1. Download or clone this repository into your wp-content/plugins/ directory
  2. Run composer install in the plugin directory
  3. Activate the plugin in WordPress admin
cd wp-content/plugins
git clone https://github.com/epicwp/polylang-internal-link-replacer.git
cd polylang-internal-link-replacer
composer install

Usage

Once activated, the plugin works automatically. No configuration needed.

The plugin runs on the frontend only and replaces internal links based on the current language set by Polylang.

Use with Polylang Automatic AI Translation

This plugin works great as a companion to Polylang Automatic AI Translation - our AI-powered translation plugin for Polylang.

The AI translation plugin already translates internal links during the translation process using intelligent link detection. However, in some edge cases, links may not be found or translated:

  • Links added after initial translation
  • Dynamic links generated by shortcodes or plugins
  • Links in cached content
  • Complex URL structures

Polylang Internal Link Replacer serves as a safety net, catching any internal links that weren't translated and replacing them on page load. This ensures your visitors always land on content in their preferred language.

How It Works

  1. When a page loads, the plugin scans the HTML content for internal links
  2. Each link URL is parsed using WordPress rewrite rules to identify the target post or term
  3. The plugin queries Polylang for the translated version in the current language
  4. If a translation exists, the link is replaced with the translated URL

Performance

The plugin is optimized for performance:

  • Only runs on frontend requests
  • Skips processing if no href attributes are found
  • Uses efficient DOM parsing with voku/simple_html_dom
  • Caches rewrite rules during request

License

GPL-2.0-or-later

Author

EPIC WP

Releases

3 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.3 latest
Apr 7, 2026 6mo ago
polylang-internal-link-replacer-v1.1.3.zip
10
Apr 7, 2026 6mo ago
polylang-internal-link-replacer-v1.1.2.zip
4
Nov 25, 2025 11mo ago
polylang-internal-link-replacer-v1.1.1.zip
26

Active-site estimate ≈20 comes from the median of recent superseded releases. Method.

A grade

Security

Polylang Internal Link Replacer 1.1.3 · audited by WP Registry

No security issues found.

Audited release
1.1.3
Findings
none
Worst severity
—
Content hash
8f06c709aef35fdd64819eda…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.