Background of the issue:
I have numerous custom PHP pages that WPML doesn't recognize. These strings don't appear in String Translation at all. From the documentation, I understand the only way is manual registration using: do_action('wpml_register_single_string', $context, $name, $value) to register strings and apply_filters('wpml_translate_single_string', $original_value, $domain, $name) to display translations. However, this isn't practical - I have hundreds of custom template files.
Symptoms:
WPML doesn't recognize strings from custom PHP pages, and they don't appear in String Translation.
Questions:
Is manual registration truly the only solution for recognizing strings in custom PHP pages?
You need to wrap the strings in your custom templates with the proper GETTEXT functions. You can read more about this here.
hidden link
Then, in WPML -> Theme and plugins localization, you can scan your custom theme or plugin and the strings should appear for translation in WPML -> Strings Translation.
Please let me know if you have any further questions.
Regards,
Itamar.
The topic ‘[Closed] I have numerous custom PHP pages that WPML doesn’t recognize’ is closed to new replies.