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.
Tagged: Compatibility
This topic contains 5 replies, has 3 voices.
Last updated by Nigel 10 months ago.
Assisted by: Nigel.
Author | Posts |
---|---|
January 12, 2024 at 5:43 pm #15180480 | |
stadeli |
Tell us what you are trying to do? We are using a license key delivery plugin. Each product ID has an inventory of keys that are sold to customers. They are like serial numbers that will never be translated. Is there any documentation that you are following? WPML products translation. I read something about adjust IDs but it goes over my head. Is there a similar example that we can see? What is the link to your site? hidden link Hi, Is there a way to translate products WITHOUT creating a dupliate? Thanks |
January 15, 2024 at 7:52 am #15183383 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or if I can help with the issue quickly. If you are asking if there is a way of translating a product without creating another product in 2nd language, that is not possible. Product in 2nd language will be created as translation of original one. The only way is if you create a new product only in 2nd language. Let me know if you have any other questions or doubts. Regadrs, |
January 15, 2024 at 9:58 am #15184020 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
Hi Daniel Let me see if I can help you here. There are a couple of things I need to understand to be able to advise you. You have license keys attached to products. I'm guessing, from your plugin list, this is provided by the SeriousWeb Keys Manager plugin. To say what is involved in using these in a multilingual context I would need to know how this data is stored, and how it is connected to products (how does a product know a particular licence key relates to it). Is it via custom fields? Custom database tables? If you have any information you can share about that, please do so. (I could probably deduce what's involved if I have access to your site and can add some debugging plugins.) Second, how do you intend this to behave in the context of translations? You translate products. Should the translated products be linked to the same licence keys, or should they be linked to different licence keys relevant to that language? If you are happy to let me inspect your site (preferably a staging site), then let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup. Can you direct me to a sample product that has such licence keys, and describe what is involved to link the product to the licence keys? |
January 17, 2024 at 10:11 am #15193954 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
OK, thanks for that. I had a look at the documentation you shared, and I added a plugin to be able to inspect the database directly on the staging site for that test product so that I could see it in action. Unfortunately, I don't see a possible solution, without work by the plugin authors in collaboration with WPML to make it operate in a multilingual context. If the plugin were connecting licences to products via custom fields, for example, then WPML can handle that, it would just be a question of the appropriate translation preferences for the relevant custom fields. But as the plugin uses custom database tables it's not so simple. The key table is the lmfwc_licenses table (hidden link). That stores the product ID (and the order ID) to connect the licences to the products, so with the test product you gave me, those are stored in that table with product_id = 317. (There are 49 rows; 11 have order IDs, i.e. have been sold already, 38 are still available for sale.) Because the different language versions of the product have the same pool of licences available to sell any solution would likely need to leave the product ID in that table untouched but where necessary filter the product ID to swap the ID of the default language product with that of the translated product, where applicable. The plugin currently doesn't offer any filters that would be useful in this respect: hidden link So some modifications to accommodate a multilingual workflow are likely to be needed. So I suggest you contact the plugin authors and encourage them to join the WPML Go Global programme (where they can work with our compatibility team to identify the best solution), via this link: https://wpml.org/documentation/support/go-global-program/ I'm sorry I can't provide a solution or workaround, but the way the plugin is currently configured that is not possible. |
January 17, 2024 at 6:03 pm #15196488 | |
stadeli |
Thanks for the assessment Nigel. I will contact the plugin author to see if I have any luck. Is there no way to translate the products "on the fly" like the string replacement method that was used to translate stuff in the code that wasn't translation ready? (if I remember right) We only need to translate the product description and short description, the title and even the category could stay in English. It's like a filter that checks for a string (in this case a long text) and before it is output on the screen it replaces it with the equivalent German or Czech string? |
January 18, 2024 at 8:08 am #15198370 | |
Nigel Supporter Timezone: Europe/Madrid (GMT+01:00) |
You could change the translation settings for products to as-if-translated, i.e. you don't translate products and on secondary languages you display the default language version of the product (i.e. the English product). I'm not sure about the internal logic of String Translation to say whether it would be possible to display some strings in the secondary languages when the English product was being displayed while navigating the site in, say, German. But the problem is the key things you want to translate—the long and short product descriptions—are the product post content (and excerpt) itself, precisely the parts (along with the title) that get translated when you translate the post. They are not strings that can be filtered and swapped out. So, I'm sorry, I don't see a workaround. As an interim solution the only thing I think you can do is use the as-if-translated mode and not translate these products at all, showing the English products for all languages. (Note that you can still translate—and show—other products that do not have this licence-key problem with this mode.) |