Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 10:00 8:00 – 10:00 8:00 – 13:00 8:00 – 13:00 9:00 – 13:00 -
- 11:00 – 17:00 11:00 – 17:00 14:00 – 17:00 13:00 – 17:00 13:00 – 18:00 -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by Lauren 1 year, 5 months ago.

Assisted by: Lauren.

Author Posts
February 20, 2024 at 6:44 pm

webmasterW

I am working with ACF, but the labels are not getting translated

February 20, 2024 at 7:54 pm
February 20, 2024 at 7:55 pm #15324658

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Please let me know once you have Cornerstone updated and where to go on the backend to see how the titles for the sections are added, and I'll be happy to further troubleshoot. Thanks!

February 21, 2024 at 4:10 pm #15329335

webmasterW

Hello Lauren,

I have found where the content is coming from. It seems it is hard coded under the functions.php file on the Malta Theme. Check this video with my findings: hidden link

My question now is, how can I translate that content that is hard coded?

February 21, 2024 at 4:39 pm #15329391

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Glad you were able to locate the titles. For content that is hard coded, you can wrap the strings in a gettext call and then scan the theme at WPML -> Theme and plugins localization. After that you should be able to translate them using string translation. Be sure not to leave the text domain blank, as I have seen issues with that in the past. Here is some documentation you can follow to add the gettext calls:
https://wpml.org/documentation/support/translating-the-theme-you-created/

February 27, 2024 at 5:30 pm #15350553

webmasterW

hidden link

February 27, 2024 at 10:06 pm #15351491

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

In the first part of the video you mentioned that you changed the titles to dynamic fields, but then the code you showed was hard coded titles. The hard code titles don't have gettext calls, so they will not show up in string translation until you wrap them in the correct calls and then rescan the theme for strings at WPML -> Theme and plugin localization. Once you do that, let me know if they still are not translated on the frontend. I linked the documentation with examples of how to wrap the texts in my previous reply.

The topic ‘[Closed] I am working with ACF, but the labels are not getting translated’ is closed to new replies.