We'll create fresh WordPress site with Multilingual Polylang installed. You have 20 minutes to test the plugin after that site we'll be deleted.
This plugin, which requires polylang
provides the means to include posts that have no translation in the current
language on pages of posts.
Multilingual Polylang provides two public functions:
The function MultilingualPolylang::get_query()
returns a WP_Query
object with posts from
all languages but where there is a translated post, only the post in the current
language will be included
The function MultilingualPolylang::get_permalink()
can be used as a drop-in replacement to
get_permalink(). This will replace the language in a post URL so that a post
can be viewed in a language different to that of the rest of the interface.
This plugin uses wp-cli and PHPUnit for testing.
$ git clone [email protected]:aptivate/multilingual-polylang.git
If not already present, install wp-cli
If not already present, install PHPUnit
$ cd multilingual-polylang
$ bash bin/install-wp-tests.sh test_db_name db_user 'db_password' db_host version
where:
test_db_name
is the name of your temporary test WordPress databasedb_user
is the database user namedb_password
is the passworddb_host
is the database host (eg localhost
)version
is the version of WordPress (eg 4.7.5
or latest
)From the plugin directory:
$ phpunit