PHPackages                             valu/wp-graphql-polylang - 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. [API Development](/categories/api)
4. /
5. valu/wp-graphql-polylang

ActiveWordpress-plugin[API Development](/categories/api)

valu/wp-graphql-polylang
========================

Polylang bindings for wp-graphql

v0.7.1(1y ago)146108.2k↓30.7%26[36 issues](https://github.com/valu-digital/wp-graphql-polylang/issues)[14 PRs](https://github.com/valu-digital/wp-graphql-polylang/pulls)GPL-2.0-or-laterPHPCI passing

Since May 7Pushed 1y ago2 watchersCompare

[ Source](https://github.com/valu-digital/wp-graphql-polylang)[ Packagist](https://packagist.org/packages/valu/wp-graphql-polylang)[ RSS](/packages/valu-wp-graphql-polylang/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (11)Versions (38)Used By (0)

WPGraphQL Polylang Extension
============================

[](#wpgraphql-polylang-extension)

Extend [WPGraphQL](https://www.wpgraphql.com/) schema with language data from the [Polylang](https://polylang.pro/) plugin.

Features
--------

[](#features)

For posts and terms (custom ones too!)

- Adds `language` and `translations` fields
- Filter with a `language` where argument
- Set the language on create and update mutations
- Show all translations in the api by default
    - Polylang patches the WP Query to only list items with the current default language. This plugin reverts that for the GraphQL api
- ACF Options Pages support

Root queries

- `defaultLanguage` get the current default language
- `languages` list all configured languages

Menu

- Filter menu items by language

For details please refer to the generated docs in GraphiQL.

Example
-------

[](#example)

Example showing all features

```
query PolylangExample {
    # Filter pages by language. If not set it defaults to ALL
    pages(where: { language: EN }) {
        nodes {
            title

            # Get language of each page
            language {
                code # Language code
                name # Human readable name of the language
            }

            # Get links to the translates versions of each page
            # This is an array of post objects
            translations {
                title
                link
                language {
                    code
                }
            }
        }
    }

    # Taxonomies such as tags can be filtered like post objects
    tags(where: { language: EN }) {
        nodes {
            name
            language {
                code
                name
            }
        }
    }

    # Get translated version of a given menu
    menuItems(where: { language: EN, location: FOOTER_MENU }) {
        nodes {
            url
        }
    }

    # Get the default language
    defaultLanguage {
        name
        code
    }

    # Get all configured languages
    languages {
        name
        code
    }

    # Get translations for ACF Options Pages.
    # See the section in the README.
    siteSettings(language: EN) {
        siteSettings {
            footerTitle
        }
    }
}
```

Requirements
------------

[](#requirements)

- PHP 7.2 or later
- [WPGraphQL](https://github.com/wp-graphql/wp-graphql/releases) 0.13.x or later
- Polylang 2.6.5 or later
    - The free version is enough
    - If you get the PRO version the pro features such as translated slugs will work too

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

[](#installation)

If you use composer you can install it from Packagist

```
composer require valu/wp-graphql-polylang

```

Otherwise you can clone it from Github to your plugins using the stable branch

```
cd wp-content/plugins
git clone --branch stable https://github.com/valu-digital/wp-graphql-polylang.git

```

ACF Options Pages
-----------------

[](#acf-options-pages)

In addition to WPGraphQL and Polylang plugins you'll need these plugins too

- [Advanced Custom Fields Pro](https://www.advancedcustomfields.com/pro/)
    - It's Pro only feature
- [ACF Options For Polylang](https://wordpress.org/plugins/acf-options-for-polylang/)
- [WPGraphQL for Advanced Custom Fields](https://www.wpgraphql.com/acf/)
    - v0.3.2 or later is required

You can install the free plugins using Composer. You'll need to have the [WordPress Packagist](https://wpackagist.org/) repository enabled.

```
composer require wp-graphql/wp-graphql-acf wpackagist-plugin/acf-options-for-polylang

```

When registering the Options Page you must pass in `show_in_graphql` and `graphql_field_name` arguments.

```
acf_add_options_page([
    'page_title' => __('Site settings', 'theme'),
    'menu_title' => __('Site settings', 'theme'),
    'menu_slug' => 'site-settings',
    'capability' => 'manage_options',
    'redirect' => false,
    'show_in_graphql' => true,
    'graphql_field_name' => 'siteSettings'
]);
```

Slack
-----

[](#slack)

You can find us from the [WPGraphQL Slack](https://wpgql-slack.herokuapp.com/) on the `#polylang` channel.

WPML
----

[](#wpml)

But I'm using WPML?!

There's [rburgst/wp-graphql-wpml](https://github.com/rburgst/wp-graphql-wpml).

Or you might want to checkout migration docs

Contributing
------------

[](#contributing)

Checkout [CONTRIBUTING.md](CONTRIBUTING.md)

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance40

Moderate activity, may be stable

Popularity49

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.3% 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 ~129 days

Recently: every ~461 days

Total

18

Last Release

423d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62e64ab16d2c22b2d02dd123a85135093821bc9f7f3619f38c84227ed93427af?d=identicon)[valu](/maintainers/valu)

---

Top Contributors

[![esamattis](https://avatars.githubusercontent.com/u/225712?v=4)](https://github.com/esamattis "esamattis (331 commits)")[![saulirajala](https://avatars.githubusercontent.com/u/5536354?v=4)](https://github.com/saulirajala "saulirajala (5 commits)")[![jasonbahl](https://avatars.githubusercontent.com/u/1260765?v=4)](https://github.com/jasonbahl "jasonbahl (4 commits)")[![simptheshrimp2](https://avatars.githubusercontent.com/u/104360608?v=4)](https://github.com/simptheshrimp2 "simptheshrimp2 (3 commits)")[![davidfaber](https://avatars.githubusercontent.com/u/282859?v=4)](https://github.com/davidfaber "davidfaber (2 commits)")[![jmakinen81](https://avatars.githubusercontent.com/u/59354638?v=4)](https://github.com/jmakinen81 "jmakinen81 (2 commits)")[![tpaananen79](https://avatars.githubusercontent.com/u/15121043?v=4)](https://github.com/tpaananen79 "tpaananen79 (1 commits)")[![huesy](https://avatars.githubusercontent.com/u/158837?v=4)](https://github.com/huesy "huesy (1 commits)")[![oliverudekyll](https://avatars.githubusercontent.com/u/117179646?v=4)](https://github.com/oliverudekyll "oliverudekyll (1 commits)")[![philJohnson](https://avatars.githubusercontent.com/u/1414610?v=4)](https://github.com/philJohnson "philJohnson (1 commits)")

---

Tags

graphqlpolylangwordpress-pluginwpml

### Embed Badge

![Health badge](/badges/valu-wp-graphql-polylang/health.svg)

```
[![Health](https://phpackages.com/badges/valu-wp-graphql-polylang/health.svg)](https://phpackages.com/packages/valu-wp-graphql-polylang)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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