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: ACF translation display: Wrong Date return format is returned in secondary languages

Solution: - Go to WPML->Settings->Custom Fields Translations - Click the Show System Fields links there - Now search for the date field name - Mark the system fields for date field name "_date" as a copy.

This topic contains 8 replies, has 3 voices.

Last updated by Varda Stern 2 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
August 2, 2019 at 2:27 pm #4330837

Varda Stern

I am trying to: translate News items which were inserted using ACF Pro. The date is defined as Date picker, Display format is d/m/y (02/08/2019), Return format is defined as F j, y (August 2, 2019).
Full text field was defined Field type Wysiwyg editor, and inside the text we inserted the shortcode [youtube]nhSeWxFUOtE[/youtube]
In the translation : The date is displayed as ymd (20190802) and the shortcode is displayed as it was inserted.
In order to display the item correctly we have to switch to each language manually (in the backend) and update manually

Link to a page where the issue can be seen:

<em><u>hidden link</u></em>

,

<em><u>hidden link</u></em>

I expected to see:Juni 30, 2019

Instead, I got:20190630

August 4, 2019 at 1:08 am #4335091

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

thanks for contacting us.

date format should be a translatable string available in String Translation - I am sure there is the default WordPress one, but I don't know if ACF uses another one.

Could you try to search in String Translation and in the String Admin page (the link is at the bottom of String Translation page) if you can find a string about date format? If there is, translating it should be enough to solve the issue.

August 4, 2019 at 2:49 pm #4336577

Varda Stern

Hi Laura,
Thank you for your reply.
I couldn't find any relevant string translation.( And string translation is not relevant to the shortcode issue )
I think that the issue must be somewhere else, as all the content is passing correctly to the translation, but not displayed well. If I change the language at the back-end (with the upper flag)and just update the item - the display is correct. (eg.

<em><u>hidden link</u></em>

)

Best Regards
Varda

August 9, 2019 at 7:19 am #4368131

Varda Stern

Hi Laura,
On August 6 I replied to your private message, but it seems that you didn't get my email.

I followed your instructions, and the migration is ready.
I'm waiting to your response.

Thank you,
Varda

August 9, 2019 at 11:30 am #4369735

Varda Stern

Hello Shekhar,
Thank you for your suggestions. I hope I'm replying in the correct place.

1. I didn't understand your advice. please look at the image question.gif. Is this the place you suggest me to click? I tried to check it and it didn't help.
I also don't understand where I have to change the code of the template. I'll try to understand the guide.

2.For the Shortcode issue - You checked an item which we corrected by manually entering to the German translation and updating it - this corrected the two issues at this item.
Please look at the Polish teranslation, which is as it was translated (without update):

<em><u>hidden link</u></em>

and

<em><u>hidden link</u></em>

Here the issue is demonstrated.

Regards
Varda

August 9, 2019 at 11:53 am #4369919

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, that's the one you will need to click. Try this once and let me know, if this doesn't work I will provide you steps to fix it via code.

I will check the shortcode issue shortly.

Thanks

August 9, 2019 at 12:20 pm #4370139

Varda Stern

Hi,
This didn't help (do I have to do anything else after clicking the "copy" button? Should it effect only new items?)

Varda

August 12, 2019 at 11:56 am #4380471

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

It should change once it's set to Copy, but if this doesn't help, I request you to go to Custom Fields once and make some changes to return format and check the issue.

Regarding the shortcode issue, I can see the issue on the site, being so I request you to follow either of the following 2 ways to fix this issue:

#1 (Recommended)
- Create a different field for the youtube and copy these fields
- You will need to add the field in the template file too.

#2
- Using the manual editor and switch the language to save the fields.

Let me know if this helps.

Thanks

August 15, 2019 at 6:32 am #4399207

Varda Stern

My issue is resolved now. Thank you!