This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: The WPML settings for my ACF are not working correctly

Solution: Please update to the latest version of Advanced Custom Field Multilingual

This topic contains 6 replies, has 2 voices.

Last updated by hirokiT-2 5 months, 3 weeks ago.

Assigned support staff: Alejandro.

Author Posts
April 23, 2019 at 7:31 am

hirokiT-2

I am trying to:

My site has English and Japanese.
I make the custom field of ACF post objects. I set this as "copy" acf muli lingual.

and I have 2 posts A and B in each lang.
the site works well as multi language.

I set B post to A as post objects in the editor of A post in Japanese lang.
in front end, when the lang is Japanese, it works like I expect.
but in Eng, the page shows in Eng, but the post object shows in Japanese.

if I set the fields as "translate" and I re-set the post object in english page.
it works well in English.

I expected to see:

but I'd like to select posts only one time, and want to show the proper posts in each languages withour setting again.
Is there good solve?

April 23, 2019 at 8:49 am
April 23, 2019 at 9:51 am #3661563

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello, i see that the recommend-article-box.php file is being used somewhere else inside a loop, right? would you mind telling me where (always, in the back-end, in the files of your theme or plugin)?

Since you're using the_title() function, it must be inside a loop, so the loop must be correctly configured in order to show the correct language's content.

Please let me know so i can continue troubleshooting your issue.

April 24, 2019 at 2:25 am #3668481

hirokiT-2

I cannot catch a point what you need the info.

where I use the_title() are mainly in
/themes/travelguide/_inc/single-mainbody.php
/themes/travelguide/_inc/flex-article-other-posts.php
/themes/travelguide/_inc/recommend-article-box.php
as getting posts by custom field of post object.

correct?

$posts = get_sub_field( 'inserted-post' );
foreach ( (array)$posts as $post ): setup_postdata( $post );

I get posts like above.
and I loop them as usual.

April 24, 2019 at 3:52 pm #3674927

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I already gave all this information to our developers and i'm waiting for their answer.

In the meantime, could you try something else?

I notice you have created the "original" cities/countries in Japanese, even though the site has English as the default Language.

Could you try to create a city in Japanese and then translate it into English (and not the other way around as you did with Osaka and Japan) and then try to show it in the front-end as you did in Japan with the Osaka city and see if the problem still arises?

Let me know.

April 25, 2019 at 5:54 am #3678923

hirokiT-2

It works well.

I set "Default language" English to Japanese.
then I post the new one in Japanese and another post which is selected from the first post with both language.
then, I set the secondary post as post object of ACF.

Does it means that we shouldn't change default language, if we use "post object" custom field?
if we'd like to do that, what should we do?

Thank you for your helping.

April 26, 2019 at 2:07 pm #3691349

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I just updated the plugin to our latest release and it seems to work perfectly now. can you confirm please?

April 27, 2019 at 4:27 am #3694587

hirokiT-2

Thank you for your advice.
My issue is resolved now.