PHPackages                             davidwebca/wp-polylang-translate-rewrite-slugs - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. davidwebca/wp-polylang-translate-rewrite-slugs

ActiveWordpress-plugin[Localization &amp; i18n](/categories/localization)

davidwebca/wp-polylang-translate-rewrite-slugs
==============================================

Polylang - Translate URL Rewrite Slugs

0.3.9(4y ago)33942PHP

Since May 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/davidwebca/wp-polylang-translate-rewrite-slugs)[ Packagist](https://packagist.org/packages/davidwebca/wp-polylang-translate-rewrite-slugs)[ Docs](https://github.com/davidwebca/wp-polylang-translate-rewrite-slugs)[ RSS](/packages/davidwebca-wp-polylang-translate-rewrite-slugs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Polylang - Translate URL Rewrite Slugs
======================================

[](#polylang---translate-url-rewrite-slugs)

WordPress plugin that add rewrite url slugs translation feature to Polylang.

Work in progress ;)

Upgrade notice &lt; 0.3.0
-------------------------

[](#upgrade-notice--030)

If you used a version prior to 0.3.0, the plugin will probably crash as the structure of the param for the "pll\_translated\_post\_type\_rewrite\_slugs" filter has changed.

Translate Post Type URLs
------------------------

[](#translate-post-type-urls)

Translate rewrite slugs for post types by doing 5 things:

- Remove original extra rewrite rules and permastruct for these post types;
- Translate the extra rewrite rules and permastruct for these post types;
- Stop Polylang from translating rewrite rules for these post types;
- Fix "get\_permalink" for these post types.
- Fix "get\_post\_type\_archive\_link" for these post types.

To translate a post type rewrite slug, add the filter "pll\_translated\_post\_type\_rewrite\_slugs" to your functions.php file or your plugin and add the "has\_archive" and "rewrite" key has you normally do for the params of the "register\_post\_type" Wordpress function but add it for each post type and language you want.

Example

```
