PHPackages                             aucor/polylang-smart-language-select-disabler - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aucor/polylang-smart-language-select-disabler

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

aucor/polylang-smart-language-select-disabler
=============================================

1.1.1(6y ago)134.6k—0%4[1 PRs](https://github.com/aucor/polylang-smart-language-select-disabler/pulls)GPL-2.0-or-laterPHP

Since Nov 5Pushed 6y ago7 watchersCompare

[ Source](https://github.com/aucor/polylang-smart-language-select-disabler)[ Packagist](https://packagist.org/packages/aucor/polylang-smart-language-select-disabler)[ Docs](https://github.com/aucor/polylang-smart-language-select-disabler)[ RSS](/packages/aucor-polylang-smart-language-select-disabler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (9)Used By (0)

Smart Language Select Disabler for Polylang
===========================================

[](#smart-language-select-disabler-for-polylang)

**Contributors:** [Teemu Suoranta](https://github.com/TeemuSuoranta), [Timi Wahalahti](https://github.com/timiwahalahti)

**Tags:** Polylang, Admin, Language Select, WordPress

**License:** GPLv2 or later

[![polylang-smart-disable-language-select](https://user-images.githubusercontent.com/9577084/28357103-fa19a40c-6c72-11e7-8901-06700b4b4384.jpg)](https://user-images.githubusercontent.com/9577084/28357103-fa19a40c-6c72-11e7-8901-06700b4b4384.jpg)

Why this plugin exists?
-----------------------

[](#why-this-plugin-exists)

### Changing post's or term's language when it has translations messes things up

[](#changing-posts-or-terms-language-when-it-has-translations-messes-things-up)

Basically the translations are unlinked and there is no warning for this. You may need to change post's language for example when you start to write a new post and notice that it's in wrong language. When translations are involved, there's really no use for changing the language.

### Users confuse adding translations and changing post's language

[](#users-confuse-adding-translations-and-changing-posts-language)

I've seen that users have multiple times changed post's language when they meant to navigate to translation. Smartly disabling the select enhances the UI.

### Changing the posts language is risky business anyway

[](#changing-the-posts-language-is-risky-business-anyway)

Changing the language of post when it has content is prone to errors. Even though the language can be changed, the images added to content may still be in wrong language. Custom fields, relations etc are not automatically changed. Language should be changed right away before adding content.

### Changing the site default language is risky business anyway

[](#changing-the-site-default-language-is-risky-business-anyway)

Changing the site default language is prone to errors. Even though the language can be changed, links in content may still be in wrong language. Custom fields, relations etc are not automatically changed. Language should be changed only if user knows what they are doing.

What it does?
-------------

[](#what-it-does)

- Checks if currently edited post or term has translations
- If it has, hides select and shows the name of current language with CSS and vanilla JS
- Removes option to change default language unless the user does not provide `iknowwhatimdoing` GET-parameter or allows it via filter

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

[](#installation)

Download and activate. That's it. You will need Polylang, too (d'oh).

**Composer:**

```
$ composer require aucor/polylang-smart-language-select-disabler

```

**With composer.json:**

```
{
  "require": {
    "aucor/polylang-smart-language-select-disabler": "*"
  },
  "extra": {
    "installer-paths": {
      "htdocs/wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
    }
  }
}

```

Filters
-------

[](#filters)

You can disable select always or build some fancy custom logic:

```
function my_polylang_disable_language_select($disable_select, $current_screen) {
	return true;
}
add_filter('polylang-disable-language-select', 'my_polylang_disable_language_select', 10, 2);

```

Allow default language change:

```
add_filter('polylang-disable-default-language-select', '__return_true');

```

Issues
------

[](#issues)

- No disabling for media (to-do)

Releases
--------

[](#releases)

### 1.1.1 WordPress.org release

[](#111-wordpressorg-release)

### 1.1.0 Disable default language change select

[](#110-disable-default-language-change-select)

Changing site default language will probably cause some issues if you don't knows what you are doing. Disable the availability to do so, unless the user know what they are doing. Also, use WordPress coding standards to make contributing easier. Props to @timiwahalahti for changes in this release.

### 1.0.2 Remove `create_function` usage and include license

[](#102-remove-create_function-usage-and-include-license)

### 1.0.1 Add changes that dropped somewhere along the way

[](#101-add-changes-that-dropped-somewhere-along-the-way)

Added some missing stuff because some changes dropped in 1.0.0 (facepalm)

### 1.0.0 Disable functionality rewritten

[](#100-disable-functionality-rewritten)

The HTML attribute "disabled" caused many problems. The disabling was changed so that the select is hidden with CSS and in its place, plain paragraph with current language is displayed.

### 0.1.1 Fix bug when adding a new term translation

[](#011-fix-bug-when-adding-a-new-term-translation)

Disabling the language select messes up creating new term translation. The translation wasn't linked to the original term because of the disabled attribute. Tried to remove the disabled attribute on submit but couldn't get it work for some reason with WordPress admin form. Removed the disabling for now on that view.

### 0.1.0 Initial release

[](#010-initial-release)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

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 ~143 days

Recently: every ~186 days

Total

8

Last Release

2472d ago

Major Versions

0.1.1 → 1.0.02017-07-19

### 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)

---

Top Contributors

[![TeemuSuoranta](https://avatars.githubusercontent.com/u/9577084?v=4)](https://github.com/TeemuSuoranta "TeemuSuoranta (7 commits)")[![timiwahalahti](https://avatars.githubusercontent.com/u/415544?v=4)](https://github.com/timiwahalahti "timiwahalahti (5 commits)")[![tnottu](https://avatars.githubusercontent.com/u/4559075?v=4)](https://github.com/tnottu "tnottu (1 commits)")

### Embed Badge

![Health badge](/badges/aucor-polylang-smart-language-select-disabler/health.svg)

```
[![Health](https://phpackages.com/badges/aucor-polylang-smart-language-select-disabler/health.svg)](https://phpackages.com/packages/aucor-polylang-smart-language-select-disabler)
```

###  Alternatives

[ezsystems/ezplatform-matrix-fieldtype

Repository dedicated to Matrix Field Type for eZ Platform

25633.6k11](/packages/ezsystems-ezplatform-matrix-fieldtype)[cobweb/external_import

Tool for importing data from external sources into the TYPO3 database, using an extended TCA syntax. Provides a BE module, a Scheduler task, a command-line tool, reactions and an API.

23369.4k10](/packages/cobweb-external-import)[terminal42/contao-folderpage

Provides a new page type for Contao that allows you to group pages into folders.

18147.9k9](/packages/terminal42-contao-folderpage)

PHPackages © 2026

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