PHPackages                             aucor/polylang-translate-existing-media - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aucor/polylang-translate-existing-media

ActiveWordpress-plugin

aucor/polylang-translate-existing-media
=======================================

Bulk translate and replace all existing media in content, featured image and meta fields when you enable translations in media with Polylang.

0.2.2(7y ago)292.5k—0%4[1 issues](https://github.com/aucor/polylang-translate-existing-media/issues)GPL-2.0-or-laterPHP

Since Sep 30Pushed 7y ago6 watchersCompare

[ Source](https://github.com/aucor/polylang-translate-existing-media)[ Packagist](https://packagist.org/packages/aucor/polylang-translate-existing-media)[ Docs](https://github.com/aucor/polylang-translate-existing-media)[ RSS](/packages/aucor-polylang-translate-existing-media/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

Polylang Add-on: Translate existing media
=========================================

[](#polylang-add-on-translate-existing-media)

**Contributors:** [Teemu Suoranta](https://github.com/TeemuSuoranta)

**Tags:** polylang, media, attachments, translations

**License:** GPLv2 or later

[![screen shot 2017-01-23 at 17 02 03](https://cloud.githubusercontent.com/assets/9577084/22209080/d93723f6-e18d-11e6-918c-c3cf390f3c70.png)](https://cloud.githubusercontent.com/assets/9577084/22209080/d93723f6-e18d-11e6-918c-c3cf390f3c70.png)

Description
-----------

[](#description)

Polylang Translate existing media is an add-on for the multilingual WordPress plugin [Polylang](https://wordpress.org/plugins/polylang/). This add-on let's you bulk translate and replace all existing media in content, featured image and meta fields you enable translations in media. This plugin is based on my other Polylang plugin [polylang-copy-content](https://github.com/aucor/polylang-copy-content).

When to use:

- When turning existing site to multi-lingual
- When enabling media translations when you already have media uploaded and added to content

Basic feature list:

- Translate all media (images and galleries) that are inside content, meta fields and featured image
- Takes care all post types (that are not 'attachment', 'revision', 'acf-field', 'acf-field-group', 'nav\_menu\_item', 'polylang\_mo')
- Image translations are linked automatically
- You can add your own custom fields that have image IDs
- Uses Polylang's functions, no messing around

**This is open source and I cannot give you any guarantees, though it has worked for me in many projects. Please, report issues and contribute!**

Installation
------------

[](#installation)

How-to use (takes around 5 minutes):

- Take a backup of your database
- Download plugin and activate (you will need Polylang active)
- Enable Media translations in Polylang Settings
- Set all content without language to default language from "Languages" admin page
- Click "1. Translate the whole media library" from the admin notice
- Click through steps (50 posts at a time). Each step will take some time.
- Click "2. Translate existing images in content" from the admin notice
- Click through steps (50 posts at a time). Each step will take some time.
- Deactivate and delete plugin when you have gone through all the steps

**Composer:**

```
$ composer aucor/polylang-translate-existing-media

```

**With composer.json:**

```
{
  "require": {
    "aucor/polylang-translate-existing-media": "*"
  },
  "extra": {
    "installer-paths": {
      "htdocs/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
    }
  }
}

```

Filters
-------

[](#filters)

**Add your own custom fields that have images saved as IDs:**

```
function prefix_custom_fields_to_translate($custom_fields) {
	// return keys of your custom fields with image id
  return array(
    'my_custom_image_field',
    'other_custom_image_field'
  );
}
add_filter( 'polylang-translate-existing-media-custom-fields-with-image-id', 'prefix_custom_fields_to_translate' );

```

Issues and feature whishlist
----------------------------

[](#issues-and-feature-whishlist)

**Issues:**

(No known issues, yet)

**To-do:**

- Include terms and their custom fields
- Replacing count might be off, make it more informative

Changelog
---------

[](#changelog)

### 0.2.2

[](#022)

- PHP 7.2. compatibility

### 0.2

[](#02)

- New Feature: Translate whole media library
- New Feature: API for custom\_fields that save the image as ID
- New Feature: Add filter to excluded post types `polylang-translate-existing-media-skip-post-types`
- Improvement: Include all post\_status
- Bugfix: Don't copy featured image, just translate the existing one

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~262 days

Total

4

Last Release

2722d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e5cda4dc82223eef9b8360d1d558773856ed36725c8ca2f0d6a6db23cb377133?d=identicon)[Teemu Suoranta](/maintainers/Teemu%20Suoranta)

![](https://www.gravatar.com/avatar/67da7c6634250ac0d91894c83401748dc125034342d2a394a40b0ab5fec92301?d=identicon)[mhgx](/maintainers/mhgx)

### Embed Badge

![Health badge](/badges/aucor-polylang-translate-existing-media/health.svg)

```
[![Health](https://phpackages.com/badges/aucor-polylang-translate-existing-media/health.svg)](https://phpackages.com/packages/aucor-polylang-translate-existing-media)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
