Support

Account

Home Forums Backend Issues (wp-admin) ACF and Polylang

Solved

ACF and Polylang

  • Hi

    I’ve got an acf site (4.3.9) which needs to be made multilanguage.
    WPML is not an option. I am using Polylang 1.6.1.https://wordpress.org/plugins/polylang/

    Unfortunatly the documentation http://www.advancedcustomfields.com/resources/multilingual-custom-fields/ only speaks of WPML.

    I cannot find the field groups option, of which the documentation talks, in Polylang. (is that availeble?) Therefore I do not get the language select box in the options area.

    I tried Polylang synchronizing custom fields checked and unchecked. Either way no Translate field groups option.

    BTW I am using a custom post type for the ACF. It shows 1 language for all the languages.

    Is there a simple solution? Both Polylang and ACF have WPML support.
    I.e.
    -could I generate an array from Polylang which is feeded as WPML to AFC?
    -or is there a way to set language as criterium for displaying? (without having to add extra categories)

  • Hi,
    ACF is known to work with Polylang as well.

    Unfortunately there is no official documentation on the same.

    If you are still facing any specific problem with the implementation, feel free to contact me for further support.

  • Hi James

    I am glad to hear that it is possible.
    My question is how to get the Translate field groups option in admin.
    Do you know of an (code) example somewhere?
    Or someone that I could contact who has achieved a merge?

    thx Inigo

  • This reply has been marked as private.
  • Hello,
    I also use the plugin Polylang since shortly.
    WPML works perfectly with the ACF beautiful but too heavy, too complicated and paying.
    Could you help me run Polylang with ACF.

    In advance thank you.

  • This reply has been marked as private.
  • I managed to perfectly translate the AFC fields just bij reading the documentation on string translation
    https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
    So no difficult integration between polylang and ACF.

    I just added pll_register_string to my functions.php.
    This adds the sting inside the function very nicely to the list of translatable words in the admin section of polylang to translate in all available languages.
    Then just add the pll__ en pll_e function with the respective sting in the code where ever you need a translated string.
    Works like a charm.

    e.g.
    functions.php

    function polylang_translate()
    {
        pll_register_string('back', 'back','General');
    }
    add_action( 'init', 'polylang_translate' );

    Translate the string ‘back’ in the backend of WP under the category General.

    index.php
    pll_e( 'back' );

    For more info read the polylang doc.

    happy translating

  • Thanks Inigo !!! Even for fields repeater…

  • i have the same issue, i need to translate my select fields.
    i have installed polylang!

    Is it possible???
    How can i do that?

  • Hi guys,

    From what I get, I think that your issue is not from Polylang. While ACF has now a new hook for i18n for the php exported fields.

    Here you can find an exemple : https://github.com/BeAPI/boilerplate-i18n-theme-inc.

    After that, you can change i18n strings with Polylang or simply directly by using Poedit or Locotranslate.

    In other hand, if you wanna use “theme options”, please use the following add-on to make ACF Option Page support with Polylang : https://github.com/BeAPI/acf-options-for-polylang.

    Cheers,

  • Now there is a documentation about the use of polylang with ACF: https://polylang.pro/doc/working-with-acf-pro/

  • Hello, I have the same problem.
    I Have Polylang for Woocommerce, but the custom fields that I created for product pages are not showing after translating a page.
    So the translated page is showing the custom fields in the original language.

    It is possible to translate ACF with Polylang for woocommerce?

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘ACF and Polylang’ is closed to new replies.