This thread is resolved. Here is a description of the problem and solution.
Problem:
The client needs to register strings for translation in a PHP shortcode function that displays product stock status. The default language is Russian.
Solution:
If you're experiencing this issue, we recommend placing your code inside the
functions.php
file of your theme. Then, navigate to WPML > Theme and Plugin Localization and scan the theme for new strings. You can find a guide on how to do this here: Scan the Theme or Plugin.
After scanning, translate the strings at WPML > String Translation. This will allow you to use the same shortcode in any language. If the shortcode does not copy automatically when you translate content with the WPML Translation Editor, you may need to place the shortcode manually on your translated content or template.
If this solution does not apply to your case, or if it seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket if you need further assistance. You can do so here: WPML 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.
This topic contains 1 reply, has 2 voices.
Last updated by 5 months, 1 week ago.
Assisted by: Andreas W..