bkkjim
Forum Replies Created
-
Forum: Plugins
In reply to: [Sublanguage] Gutenberg and custom fields translationHow about at least a donation link? I’ll help.
Forum: Plugins
In reply to: [Sublanguage] Cannot add languageThank you for your reply, Maxime. Clicking save in Sublanguage setting still did not change the behavior.
I found a fix: the fact that there was nothing at all showing in the Original Language dropdown in Sublanguage gave me a clue. I went to General settings for the site, changed the site language to another one, then back to English. Then I deactivated and reactivated Sublanguage and the Languages custom post type did appear.
Forum: Plugins
In reply to: [Sublanguage] Using with PodsThank 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' ); }Forum: Plugins
In reply to: [Sublanguage] Using with PodsPosted too quickly. That function messes up the theme.
Forum: Plugins
In reply to: [Sublanguage] Using with PodsOne 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.
Forum: Plugins
In reply to: [Sublanguage] Translate Custom Post MetaOk, you helped me figure out the answer. The standard custom fields editor wasn’t working, but in looking around for an efficient way to create meta boxes I found the Advanced Custom Fields plugin, which works just fine.
Thank you again!
Forum: Plugins
In reply to: [Sublanguage] Title translates, but Content does notResolved
Forum: Plugins
In reply to: [Sublanguage] Title translates, but Content does notAwesome!!!! Thank you so much!
Forum: Plugins
In reply to: [Sublanguage] Title translates, but Content does notThis is a built-in feature of the Twenty Seventeen theme.
Twenty Seventeen allows you to build a striking front page comprised of content from different pages on your site. Each page’s featured image is highlighted, displayed at full screen size and with a fixed position. Twenty Seventeen has four different sections you can assign pages to.
Forum: Plugins
In reply to: [Sublanguage] Title translates, but Content does notThank you for replying. This is a clean, new install with only Sublanguage and Sublanguage Switcher as active plugins.
Translation does work fine for content pages in this them. In this case I’m talking specifically about the four front page panels. If you check the link, http://restorethai.com/en, you can see that the article title for each panel is translated, but the content is not.