This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to find the string to translate the "Login / Register" button text that is being replaced using a Code Snippet.
Solution: We recommend using the
wpml_register_single_string
and
wpml_translate_single_string
hooks to register and retrieve the translation for strings stored in the database by a snippet plugin. Here is a sample code to illustrate how to use these hooks:
Please note that the solution provided might be irrelevant if it's outdated or not applicable to your case. If the solution does not resolve your issue, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket. You can do so by visiting our support forum.
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.
1. The "add to cart" button text is being replaced with "Login / Register" using a Code Snippet.
I can't find the string to translate this text.
2. Also using WPClever Badge Mangement (free) there are EQP* badges which displays hover text "from 72 units".
I can't find the string to translate this text.
Before this ticket gets assigned to my colleagues, I will try to help.
The proper way to translate strings depends a lot on how they have been implemented inside the theme/plugin.
Sometimes, there are even duplicates of the same string and only one of them is the correct one that needs to be translated.
Also, sometimes, simply removing the string (checking the box and removing it) and then re-registering it again by scanning for it (one of the methods below) and re-translating it resolves the issue.
1. Please try this:
Go to WPML > String Translation and at the bottom of the page you will find a checkbox called "Look for strings while pages are rendered". You can enable (check) that and then go in the front end to a page where you have that string showing up and then go back to WPML > String Translation and search for that string and see if it now shows up.
2. If you can't find them inside the WPML > String Translation, they might be added as admin text.
2. Also using WPClever Badge Mangement (free) there are EQP* badges which displays hover text "from 72 units".
I can't find the string to translate this text.
New threads created by Bigul and linked to this one are listed below:
Thank you for the updates. When we are using a snippet plugin it stores the code in the Database, instead of files like plugins or themes. Therefore please use hooks(wpml_register_single_string & wpml_translate_single_string) for registering strings for translation and retrieving the translation.
Refer to the following documentation for more details and let us know your feedback.
Please note that I have opened a new ticket for the other problem. As per our support policies, we can only handle one issue per ticket. It will help us to serve you better and we can avoid discussing multiple problems in one ticket. I will get back to you soon on the latest ticket. Thank you for your understanding.
--
Thanks!
Bigul
Manage Cookie Consent
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.