• Resolved gonzalogg

    (@gonzalogg)


    Hi, i’m using Polylang and i could translate all i need (Custom Post Types, Posts, Pages, Categories, Menu) except Pods fields.

    I’m using Kalium Theme (v. 1.9.3) and this plugins:

    -Pods – Custom Content Types and Fields (2.6.7) allows me to insert data easily in each portfolio item (Name, Type, Date, Author, etc.). This are the fields i cannot translate.

    -Portfolio Post Type (0.9.3) for Custom Post Types, integrated with Kalium theme allows me to manage my portfolio easily. I could integrate the Pods on this post types to show the field when i’m creating a post, but i cannot translate the fields of each post.

    -Polylang 2.0.3 to have all the elements/content in spanish and english.

    I don’t know if i didn’t find where to translate the pods fields or if it isn’t intgrated with Polylang.

    Thanks in advance!

    https://wordpress.org/plugins/pods/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter gonzalogg

    (@gonzalogg)

    I think that a way is to translate the Pods>Templates and then choose different templates in the custom post type.

    Ideally, when i add a new post of another language (from the + of Polylang) it should complete all fields and load the template in the appropriate language, or otherwise show fields / labels in the appropriate language.

    Plugin Author Jim True

    (@jimtrue)

    You actually brought this over to our Slack #support channel. We helped you directly with a filter to modify how the translation works. Pods Templates weren’t being included in the ‘translation’ matrix because they’re internal to Pods.

    Thread Starter gonzalogg

    (@gonzalogg)

    Yes, first i posted here (and here) and then i login into support channel.

    For the record, i added this code to functions.php:

    // Agrega Polylang a Pods Admin > Templates para traducir plantillas de Pods
    // Pods - Custom Content Types and Fields Versión 2.6.7
    // Polylang Versión 2.0.3
    // Pods Templates not automatically handling Translations for PolyLang https://github.com/pods-framework/pods/issues/3741
    
    add_filter( 'pll_get_post_types', 'my_i18n_post_types', 10, 2 );
    function my_i18n_post_types( $post_types, $is_settings ) {
        if ( $is_settings ) {
    
            // Add this post type to possible i18n enabled post-types (polylang settings)
            $post_types['_pods_template'] = '_pods_template';
        } else {
    
            // Force enable this post type
            $post_types['_pods_template'] = '_pods_template';
        }
        return $post_types;
    }

    Thanks!

    Plugin Author Jim True

    (@jimtrue)

    Thanks for including the filter above, I’m adding it to the github issue to add this to Pods Templates.

    https://github.com/pods-framework/pods/issues/3741

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pods.io integration with Polylang’ is closed to new replies.