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 topic contains 7 replies, has 2 voices.

Last updated by Raja Mohammed 2 months, 4 weeks ago.

Assigned support staff: Raja Mohammed.

Author Posts
July 15, 2019 at 10:10 pm #4214747

digitalR

-----------------------------------
Tell us what you are trying to do?
-----------------------------------
We've built a custom ACF experience for a client using WPML, that after several attempts on getting the
functionality working, we're getting hung up on translations of two fields, 1 being a custom implementation
that allows us to choose the tableID (post instance), as well as a "Media" attachment file path.

The only way I've been able to allow the user to define two separate designations for a ACF "File" or "Post"
select, I have to generate two field groups, which is not a good way to manage field groups within ACF and
at times, results in (2) sets of field groups showing on the primary language.

---------------------
Integration Attempts
---------------------
- I've tried to keep the field group NOT translatable, then make the (individual) fields (in the post instances)
translatable on a field by field basis; worked for everything BUT the value for "CSV Associations" and
"Brief Download > Destination (ACF File)"
- I've tried duplicating the field group by opening the field group and then translating it (clicking duplicate
from the Translation metabox), however, when I view "English" (original) it shows BOTH field groups, but only a
single one on the "French" version of the post
- The field groups I'm having issues with are "File" and a custom field group that stores a 1-100 numerical
value that represents the CSV file associated with the post
--- I could understand it not working with the custom ACF field (1-100), but if the fields are duplicated, I would
assume I should be able to set it for each language, no?

-----------------------
Import things to note
-----------------------
- The custom field group we're struggling with is titled "CONB – Country"
- The fields were struggling with (both belong to CONB – Country) are:
--- "['tablepress_csv']" (returns a number)
--- "['s1_content']['download']['destination']" (returns a file path).
- I have an admin/pass to provide to WPML support. The website is hosted on a Pantheon instance, so SFTP access
may be limited, but I can get you a copy of files/code/db.

-------------------------------
What is the link to your site?
-------------------------------
- hidden link

-------------------------------
What is our Goal?
-------------------------------
Client should be able to provide French/English post content for the following pages:
- hidden link
--- After completing the translation, I noticed that the French version was blank, only until I clicked "Update"
on the French version did the actually translated content appear; intended functionality, or?
- hidden link{country-name}
--- {country-name} is any of the available countries, but all the countries from the first link above apply

July 15, 2019 at 10:36 pm #4214769

digitalR

----------------
I was able to:
----------------
- Configure the “Cost of Not Breastfeeding” to have a translated version, only showing Countries specific to the language being viewed
- Configure the “Configuration” options page to support linking back to either the English or French page, with language text specific to the language

-------------------------------
What I'm trying to resolve:
-------------------------------
- Translating “Countries” using the (+) & “Individual Field Translations”, will allow you to translate everything but “CSV Associations” and the “Download Brief” file
- Translating “CONB - Country” ACF field group using the “Duplicate” feature, will give us a new set of ACF fields when translating “Countries”, however
---- Once you switch to French, you cannot change the “CSV Association” from the English counter part
---- Once you switch back to English (while viewing French), you will see two “CONB - Country” ACF field groups, showing both the English and French field groups

July 16, 2019 at 10:51 am #4219337

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I will help you with your issue.

Please give some more information about the issue.

1) How the country field is created in ACF and how they are translated

2) ACF Files and image fields are handled differently Please follow the steps in the documentation,
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#how-to-handle-image-and-post-object-fields

3) To resolve the field group issue. Set the translation preference for Field groups to "Translatable - Only show translated content" From WPML > Settings > Post type translation > Field groups

Please let me know the results.

kind regards
Raja

July 16, 2019 at 2:10 pm #4220891

digitalR

Hi Raja,
Thanks for reaching out, we greatly appreciate it!

Responses below:

1. hidden link – should include the JSON configuration for the field group in question, as well any dependencies field group(s)

2. Unfortunately, I do not see this menu option, by default in this web app (see here: hidden link)

---- I downloaded and installed/activated/configured the Media Translations WPML plugin (see here: hidden link); I assume if the user defines the url for the French version of the PDF, it will update the link for each version of the translated posts that are using it?

3. I only had to change a setting for one field group (see here: hidden link)

For client instructions going forward –
I'm finding that in order to translated a post instance for the custom post type, the user needs to:
1. Translate textual content within the post itself, using either the duplication or the 1:1 translator
2. Then navigate to a new area of the admin (possibly Media Translations) in order to finish completing their translation for Media and Files

Is this the correct workflow (editing a single post translation in two different areas of the admin)?

July 17, 2019 at 8:20 am #4227209

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the information,

You are using Clone filed for Countries, the field associated should be properly translated in order for the countries to be displayed in the front end.

For some reason I am not able to view the images, it displays source not available message.

I would like to request temporary access (wp-admin and FTP) to your test site to take a better look at the issue. I have enabled private fields for you to securely share the details.

The alternative method we suggest for media is for the Custom fields created using ACF if the post has a Media/file custom field then it needs to be set to Copy and translated from Media translation. This does not apply the same for other contents which can be directly translated using WPML translation editor (1:1 translation).

Kind regards
Raja

July 18, 2019 at 2:02 pm #4239483

digitalR

Hi Raja,
I'm ready to share the primary admin user/pass & SFTP, however, when I go to reply, I'm not being presented with any "private fields". Could you explain how I can fill in these fields for you within your messaging system?

Thanks!

July 19, 2019 at 5:41 am #4244053

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Kindly apologize,
I have enabled the private fields now.

Kind regards
Raja

July 23, 2019 at 9:41 am #4264659

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the access details,

I have checked the site in detail, The "CONB – Resusable Fields" from where you are sourcing most of the fields is set to translate however the field group is missing the translation,(check the attached screenshot) Please refer the documentation to translate the field groups
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#translating-field-groups

Set the translation preference for the "reusable_csv" field to 'copy' if you prefer to display the same table to the translation. Else select 'translate' if you display a different table for translation

Since you are using Tablepress, if you prefer to translate table press contents I would suggest referring to the thread for a detailed explanation about how to translate the tables https://wpml.org/forums/topic/translate-content-of-tablepress-tables/

I hope this helps you better. let me know if you need further assistance,

Kind regards
Raja