This package is abandoned and no longer maintained. The author suggests using the hoy/polylang package instead.

A Polylang helper for WordPlate

4.0.0 2018-03-12 15:09 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:58:18 UTC


A Polylang helper for WordPlate.

Build Status StyleCI Coverage Status Latest Version License


Require this package, with Composer, in the root directory of your project.

$ composer require hoy/polylang

Login to the WordPress administrator dashboard and activate the Polylang plugin. Go to the Polylang settings page and add at least one language.


Register the translations with the pll_translations function. They will now be available for translation on the 'Strings translations' page in the WordPress administrator dashboard.

    'group' => [
        'String that should be translatable by Polylang' => 'Explanation of how the string is used',
    'general' => [
        'English' => 'The english language',
        'Swedish' => 'The swedish language',
    'cookie-bar' => [
        'This website uses cookies to ensure you get the best experience on our website.' => 'Cookie bar message',
        'I understand' => 'Cookie bar button text'

Then to fetch and print a translation you can use the trans function like you would use regular __() function.

echo trans('I understand');


Please visit Polylang's documentation to find out more about translating your post types.


MIT © Hoy Multimedia AB