Skip Navigation

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

Problema:
El cliente intenta traducir campos personalizados avanzados (ACF) y, aunque los ha traducido en las traducciones de cadenas, en el frontend siempre se muestran en el mismo idioma.

Solución:
Si estás experimentando esto, recomendamos que realices la traducción desde el editor de traducción. Este proceso solo es necesario hacerlo una vez, ya que las traducciones de las opciones se almacenan en la memoria de traducción. Hemos creado un video tutorial para guiarte en este proceso:
Video tutorial para la traducción de ACF

Además, puedes consultar la documentación correspondiente para obtener más detalles:
Documentación para traducir sitios construidos con ACF

Si esta solución no parece relevante, por favor, abre un nuevo ticket de soporte en nuestro foro de soporte de WPML.

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 22 replies, has 3 voices.

Last updated by bokeB 1 year, 6 months ago.

Assisted by: Paola Mendiburu.

Author Posts
December 4, 2023 at 10:36 am #14985327

bokeB

Tell us what you are trying to do?
Translate the advanced custom fields. I translated them in string translations, but in frontend always are shown in the same language.

In a simple product page, the custom fields are in summary. In link example, custom fields are these:
Piel: Vacuno
Acabado: Charol Bombeado
Medidas: 14-18 ft / 1.0-1.2 mm
Colección: Primavera-Verano 2024

(The first part, for example "Piel", is translated, because this label isn't a custom field, it's a text into code. The other part "Vacuno" is the part not translated and where I need to help)

Is there any documentation that you are following?
Yes, I follow tutorials, steps for translation inside the ACF plugin, etc.

What is the link to your site?
hidden link

December 4, 2023 at 11:07 am #14985551

bokeB

I send you an image with the code where I display the custom fields.
This file is functions-php, into template folder.

Captura de pantalla 2023-12-04 a les 12.06.50.png
December 4, 2023 at 5:59 pm #14990393

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for sharing the information. As for the screenshot you sent, everything seems to be in order, as the strings are prepared to be translated. I noticed that your website does not meet the memory minimum requirements for WPML, which can lead to translations not showing on the Front End.

See https://wpml.org/home/minimum-requirements/ for detailed information. You can set WP Memory Limit in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

See https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php for details. Increasing WP Memory may help improve the performance and sometimes also help resolving such issues.

You should re-save the translations to see if this solution will work. Please let me know if this helps resolve the issue. Or I'll try my best to further assist you on the matter.

December 5, 2023 at 10:41 am #14995651

bokeB

Hi,

I used this parameters, and as well I made the php.ini file to indicate memory limit of php server, because it had assigned the value -1, and the plugin didn't read it correctly.
Now, in WPML > Support all parameters and requeriments are in green color, are right.

I changed translation string and it was saved, but in frontend translationt isn't showed yet.
I follow needing support of you. I wait your reply, thanks!

December 5, 2023 at 7:26 pm #15002423

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,
thank you for sharing. To further assist you, I'd like access to a staging version of your website.
You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

December 6, 2023 at 5:17 pm #15010831

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

It's probable that the code you sent has some issue when registering the strings.

Could you please reproduce the issue on our SandBox (test) environment? I've already created one for you, with the languages set up. Please install your theme and the required plugins and recreate the issue. This way, our dev team can analyze it more efficiently 🙂

hidden link

If necessary, I'll send it to our compatibility team so they can analyze it and maybe offer a workaround. I'm going to get back to you as soon as I have feedback from them. Thank you for your patience.

December 7, 2023 at 9:45 am #15015159

bokeB

Really? Do you want to I recreate the problem? Can you derive me to someone in my timetable (UTC+2)? Its very unconfortable talk with 24h of delay... And more if each time i need to do more thinks about the problem.

I'm very grateful with your help, but please I need to fix it asap, and furthermore I had to spend 1h in recreate the problem, installing plugins, customizing ACF, printing them, creating products... I sent you my admin panel not for do this now...
Other thing, you DON'T get me access to FTP, to edit functions.php file... and therefore, I cant detected the strings in String translation plugin.

I left everything set up for you as far as I could. Please, if we can agilize this issue, now I cant use 2 days more in read your reply and I reply again....

December 7, 2023 at 10:01 am #15015331

bokeB

Sorry, I wasn't using acf multilingual. Now I detected and transalated strings.
And I edited functions.php from file editor in wp panel.
I think that now the error is reproduced correctly.

Now you have product in spanish: hidden link
And english: hidden link

December 7, 2023 at 10:03 am #15015369

bokeB

Same mistake. Fields writed and translated for me are translated, but custom fields as well translated by string translation plugin, but the translation isn't displayed.

Captura de pantalla 2023-12-07 a les 11.02.34.png
December 7, 2023 at 4:27 pm #15019181

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

thank you for reproducing the issue in the Sandbox, I know it can be irritating. I apologize for not sending the FTP credentials, I assumed you were already editing the files via WP. Fortunately, it was really helpful, as I was able to test different configurations and was able to see that the problem wasn't in the code you wrote. I managed to resolve the issue, by following this documentation:

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/

In a nutshell, I did the following:

Set the acf-field-group as not translatable;

Enabled the expert mode on ACF;

Set the individual custom fields as translatable;

Translated the content on ATE;

I translated a value as an example on hidden link so you can confirm that the issue is resolved — the rest of the content is still in Spanish, but you can translate it whenever you want. From now on, the ACF values can and must be translated via ATE, by editing the translation.

Please let me know if you need any further assistance or if this solution suffices.
Best regards,

December 8, 2023 at 11:31 am #15025295

bokeB

Sincerely, i didn't undestand nothing. I don't know what is "ATE"...
Can you explain me a bit more?
And what is this?? Why now I have this message?? (image added)
I don't undestand what you did.... Please, reply me asap and please solvent it today...
thanks.

December 8, 2023 at 11:32 am #15025313

bokeB

Sorry, i forgot the image.
Why translators I am waiting? Why 22h? Please, help me FAST, let me with someone in my UTC+2. We spent 1 week in solvent it for the delay hours between us.

Captura de pantalla 2023-12-08 a les 12.30.12.png
December 8, 2023 at 11:39 am #15025355

bokeB

and when I entry in product panel in english, i see the custom fields in spanish. This is OK, because they are being translated automatically. But, why in the rest of products the translation not is applicated???
And other think, why all fields are translated, but "Collection" no?
After "Collection" tag I have "Primavera-Verano 2024", but this string is translated in String translation panel.... Is translated in "Sping-Summer 2024"...

Why all fields were translated and this not?
I don't undestand nothing, sorry.
Can you let me talk with someone in spanish? May be we're able to undestand better.

Captura de pantalla 2023-12-08 a les 12.38.46.png
December 8, 2023 at 11:58 am #15025465

bokeB

Ok, now I understanding more or less what you did and what is ATE.

Please, this system isn't work for me, I need one alternative.

I made this website thinking in the super automatically update of content, but this system is really uncomfortable. I need to translate ALL PRODUCT MANUALLY! And worse, I NEED TO TRANSLATE MANUALLY ALL FIELDS (including colors, that are same name to 2 languages).
This system you propose me isn't valid for me, I made this website with other idea, not spending time in translate all manually. If not exists other system, it will be first time WPML dissapointed me...

I can't use ATE.
I cant' translate all Products manually.
I can't translate all fields of each product manually.

I only need that the ACF fields being displayed in the language corresponding.

Please, bring me another solution or way to do this. If not my website won't serve and I will need to change completly all systems.

December 8, 2023 at 11:59 am #15025469

bokeB

Please, if is possible let me with agent that speak spanish and have my time zone. I NEED TO FIND SOLUTION NOW.