Download the PHP package pleb/acf-polylang-translatable-fields without Composer

On this page you can find all versions of the php package pleb/acf-polylang-translatable-fields. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package acf-polylang-translatable-fields

ACF Polylang Translatable Field

This plugin adds some translatable fields to ACF for non-translated contents using Polylang

The problem

When using Polylang, each translatable post is duplicated, and that the one that matches to the users's language is displayed. The custom fields have to be filled for each post translation.

And when using qTanslate-XT, the post is not duplicate, but that's the field whitch get all translated values internally.

Sometimes, we want some duplicable post types, and some non-duplicable post types with translatable fields.

The solution

This plugin add some fields types to the ACF choices, and when the post form is submitted, that's the field himself whitch got all translated values. Internally, the values are saved with a qTranslate-like HTML comment format :

When filling in the fields, a tab will be displayed for each Polylang configured languages :

content editing languages tabs

Installation

Usage

Register fields

You have to choose your field type from the Polylang translatable group inside the ACF field type select box.

Each field type presents an additionational option, witch let you decide the empty translated value field behavior. You can choose between returning the empty value (like there is saved), and returning the default site language value instead.

Get values in your templates

The ACF get_field() function returns to you the translated value in your current context Polylang language.

This function can take a boolean third parameter to allow you to get non-formatted values. In this case, you will receive an associative array of your field translations :

Update values

You can update a translated field from outside of the box by sending your values inside an associative array within ACF update_field function :

The posted values will be merged with the others languages values.

Note your can also send your values with the 2 chars language slug instead of the 5 chars language locale :

If you send non-array value to the update_field function, it is only the current context Polylang language (or the default site language if not applicable) that will be updated :


All versions of acf-polylang-translatable-fields with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pleb/acf-polylang-translatable-fields contains the following files

Loading the files please wait ....