[Resolved] Last_name string translated, but not visible on the frontend?
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where the translated 'last_name' string of user meta in WPML is not visible on the frontend; only the default translation is shown. Solution: If you're facing a similar issue, first confirm how the user field was created. If it was created via ACF, check the translation settings of this field. Follow the guide on translating custom user fields with WPML, which can be found here: Translating Custom User Fields.
Add the following code to your functions.php to make the field translatable:
Then, use the shortcode [author_text] in your Elementor template to display the translated string.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
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.
Background of the issue:
I am trying to translate the last_name string of user meta in WPML, and I managed to translate it. However, the different translations are not being shown on the frontend, only the default one. Here is a video demonstration: hidden link. The issue can be seen on this page: hidden link. Let me know if you need wp-admin access.
Symptoms:
The translated last_name string is not visible on the frontend; only the default translation is shown.
Questions:
How can we fix the issue of the translated last_name not appearing on the frontend?
you have left the chat, so I have converted this to a ticket. We can continue here or you can open new chat as it might be quicker to resolve your issue.
Can you share more info how are you showing this string on that page in default language? Via some template or PHP or?
thanks, I have checked further and it seems even if it is ACF you need to use approach from the guide I shared and add that custom field for translation and then translate via WPML > String translation.
I have added code to your function.php and translated text:
There is one last issue i encountered earlier today...
I have had issues with this post: hidden link
When i made translations with the automatic translator, the post were not visible in the designated new language.
I translated it, but when i clicked the language switcher to find it in the posts area, it was not to find? its weird cause, its only for that specific post? Not sure what happened?
Do we delete the existing translations, and then add new? Whats the root cause of the issue?
As per right now i have this issue: cannot translate post at all: hidden link
Looking forward to hearing from you!
New threads created by Dražen and linked to this one are listed below:
Zdravo Dražene..nadam se da mogu da pišem na lokalnom jeziku. Da li možeš da mi daš kontakt finansija pošto mi treba neka korekcija na fakturi koju smo dobili od vas?
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.