Title: Using with Pods
Last modified: January 12, 2019

---

# Using with Pods

 *  [bkkjim](https://wordpress.org/support/users/bkkjim/)
 * (@bkkjim)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/using-with-pods-2/)
 * I’m trying to get this to work with Pods templates, i.e. the backend shows translations,
   but the frontend only chooses the default language.
 * This is only when going through a Pods template. When accessing fields directly
   they work. Any ideas?
    -  This topic was modified 7 years, 6 months ago by [bkkjim](https://wordpress.org/support/users/bkkjim/).
    -  This topic was modified 7 years, 6 months ago by [bkkjim](https://wordpress.org/support/users/bkkjim/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [bkkjim](https://wordpress.org/support/users/bkkjim/)
 * (@bkkjim)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/using-with-pods-2/#post-11083909)
 * One update: I had this function:
 *     ```
       add_filter('the_content', function($content) {
       	global $post;
       	return apply_filters('sublanguage_translate_post_field', $post->post_content, $post, 'post_content');
       });
       ```
   
 * but the post title was not getting translated.
 * So I took a guess and added this, and now the title translates.
 *     ```
       add_filter('the_title', function($title) {
       	global $post;
       	return apply_filters('sublanguage_translate_post_field', $post->post_title, $post, 'post_title');
       });
       ```
   
 * I think I have everything translating now including when called in a Pods template.
   To clarify the original post, what I haven’t been able to do is have a Pods template
   itself with multiple languages. I’m guessing it’s solvable with a similar filter
   function, just don’t know how to write it.
 *  Thread Starter [bkkjim](https://wordpress.org/support/users/bkkjim/)
 * (@bkkjim)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/using-with-pods-2/#post-11086175)
 * Posted too quickly. That function messes up the theme.
 *  Plugin Author [maximeschoeni](https://wordpress.org/support/users/maximeschoeni/)
 * (@maximeschoeni)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/using-with-pods-2/#post-11120463)
 * Sorry I read you thread but still had no time to check this Pods framework. I’ll
   have a look as soon as I can.
 *  Thread Starter [bkkjim](https://wordpress.org/support/users/bkkjim/)
 * (@bkkjim)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/using-with-pods-2/#post-11130497)
 * Thank you so much, but I’d just as soon save your time because I’m about to post
   another question. I came up with a workaround. Pods template tags, called “magic
   tags”, can include a function to process a field. So {@ID,get_the_title} works
   for $post_title, and for $post_content this simple function works, called by 
   the tag {ID@get_content}:
 *     ```
       function get_content($id) {
         $post=get_post($id);
       	return apply_filters( 'sublanguage_translate_post_field', $post->post_content, $post, 'post_content' );
       }
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Using with Pods’ is closed to new replies.

 * ![](https://ps.w.org/sublanguage/assets/icon-128x128.png?rev=1197494)
 * [Sublanguage](https://wordpress.org/plugins/sublanguage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sublanguage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sublanguage/)
 * [Active Topics](https://wordpress.org/support/plugin/sublanguage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sublanguage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sublanguage/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [bkkjim](https://wordpress.org/support/users/bkkjim/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/using-with-pods-2/#post-11130497)
 * Status: not resolved