Title: [Plugin: Polylang] Keep language code in all URLs
Last modified: August 20, 2016

---

# [Plugin: Polylang] Keep language code in all URLs

 *  Resolved [RogerRogers](https://wordpress.org/support/users/rogerrogers/)
 * (@rogerrogers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-keep-language-code-in-all-urls/)
 * Just started working with Polylang, nice plugin!
 * One feature that is pretty common for site localization is the ability to have
   the language code included in all URLs (e.g. /en/page-name). For Polylang this
   approach is only used where there is a potential canonical naming conflict, such
   as the Archives section. For posts and pages Polylang requires the post/page 
   permalink to be unique, thus enforcing a canonical site.
 * The problem is that even though post/page URLs are unique, they do not show the
   language in the URL, which is sometimes a desirable feature.
 * A few questions:
    – Is this a feature that could be easily achieved by creating
   a Custom Structure permalink? – If not, is this a feature that is planned for
   Polylang?
 * Thanks!
 * RogR
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-keep-language-code-in-all-urls/#post-2471182)
 * I don’t believe there is a simple way to do this without writing a plugin. It
   is in fact necessary to modify WordPress rewrite rules and filter links. This
   is what I do for archives.
 * Except when migrating from another plugin which is working this way (such as 
   WPML as discussed [here](http://wordpress.org/support/topic/plugin-polylang-permalinks-not-working)),
   I wonder why it would be a needed feature.
 * In my opinion, there is a huge drawback. If, for some reason, the plugin is deactivated,
   almost all urls would be broken. (Note that it’s already the case for archives
   but there is no other choice and this is not as important as for posts or pages).
 * > Unlike some other plugins, if you deactivate Polylang, your blog will go on
   > working as smoothly as possible.
 * It was one of the most important requirement I imposed to myself when starting
   to write this plugin.
 *  Thread Starter [RogerRogers](https://wordpress.org/support/users/rogerrogers/)
 * (@rogerrogers)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-polylang-keep-language-code-in-all-urls/#post-2471185)
 * I agree that there would be some issues with hard coded URLs breaking if the 
   plug-in is deactivated. I imagine some of this could be resolved by nofollow 
   rules and maintaining both URLs. The issue is that the language indicator in 
   the URL is often useful.
 * Regardless, your plugin is really nice and I appreciate your reply!
 * RogR
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-keep-language-code-in-all-urls/#post-2471290)
 * Although I still do not recommend it when setting up a new site, Polylang 0.7
   now includes the feature ! Hope it helps.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Polylang] Keep language code in all URLs’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-keep-language-code-in-all-urls/#post-2471290)
 * Status: resolved