2017 © Pedro Peláez
 

wordpress-plugin polylang-get-all-translations

New function to Polylang that prints all translations as key-value pairs.

image

k1sul1/polylang-get-all-translations

New function to Polylang that prints all translations as key-value pairs.

  • Monday, August 28, 2017
  • by k1sul1
  • Repository
  • 1 Watchers
  • 2 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Polylang - Get all translations

Get all translations for the current language as a single key-value object. Calls are cached for performance. You can use the object in wp_localize_script() to print all string translations to the client as a JavaScript object., (*1)

pl_get_all_translations() gives you a cached array of keypairs., (*2)

There's a few filters that you can use to configure the plugin., (*3)

Requirements

  • Polylang
  • PHP 5.4+

Installation

Install the plugin via Composer, (*4)

composer require k1sul1/polylang-get-all-translations

Activate the plugin, (*5)

wp plugin activate polylang-get-all-translations

Usage

wp_enqueue_script('theme-js', get_stylesheet_directory_uri() . '/dist/js/bundle.js', false, $version, true);
wp_localize_script('theme-js', 'pll', pl_get_all_translations());

The Versions

28/08 2017

dev-master

9999999-dev

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.4 || ^7.0

 

by Christian Nikkanen

28/08 2017

0.1.4

0.1.4.0

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.4 || ^7.0

 

by Christian Nikkanen

10/02 2017

0.1.3

0.1.3.0

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.4 || ^7.0

 

by Christian Nikkanen

05/02 2017

0.1.2

0.1.2.0

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.4 || ^7.0

 

by Christian Nikkanen

30/12 2016

0.1.1

0.1.1.0

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.4 || ^7.0

 

by Christian Nikkanen

30/12 2016

0.1

0.1.0.0

New function to Polylang that prints all translations as key-value pairs.

  Sources   Download

GPL-2.0

The Requires

  • php ^5.5 || ^7.0

 

by Christian Nikkanen