Only one language is working
-
Hi, and a million thanks for a great plugin ??
I have problem where my customer has three languages, English as default, Finnish and Swedish. I have created a page where I have set some ACF fields to localise some of the strings used in the custom theme I have built for them. I also have set these fields to be localisable in the page settings of sublanguage.
I created a utility function to serve these translations like this:
function snTrans($text_id){ global $sublanguage; $language = $sublanguage->current_language; $translations = get_post(866); $default = get_field($text_id, 866); echo apply_filters( 'sublanguage_translate_post_field', $default, $translations, $text_id, $language ); }
For some reason this only works for the Swedish localisations and for Finnish nothing is found. Also, when editing the page with the ACF text boxes, it only saves the Swedish ones, there is no way to get the Finnish ones to save. The WordPress language for the page is English US, I have tried disabling all the other plugins ecxept ACF and Sublanguage, but still the problem persists.
In my theme I do not have any extra filtering for post fields, I have two custom post types. Otherwise Sublanguage picks up translations for Finnish and Swedish nicely, but for this particular case (AFC text fields on a page) it does not work. I have some ACF fields on custom post types and on another page and these work fine.
I don’t have clue where to start looking for the answer for this one ??
- The topic ‘Only one language is working’ is closed to new replies.