WordPress action hook
wpml_register_string
Fired by 25 WordPress plugins, running on 1.8M+ sites between them.
“To register the string in wpml”
How to use wpml_register_string
It's an action: your callback runs at that point and receives 5 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wpml_register_string', function( $data, $arg2, $package, $html__, $arg5 ) {
// Your code runs here.
}, 10, 5 );Argument names come from Custom Post Type UI's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
25 plugins that fire wpml_register_string
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Custom Post Type UI1+ million installs
do_action( 'wpml_register_string', $data['label'], 'name', $package, esc_html__( 'Name (plural)', 'custom-post-type-ui' ), 'LINE' )external/wpml.php:78 -
SureForms500,000+ installs
do_action( 'wpml_register_string', $value, $name, $package, '' !== $title ? $title : $name, $type )inc/compatibility/multilingual/providers/wpml-provider.php:293 -
WPML Multilingual & Multicurrency for WooCommerce100,000+ installs
do_action( 'wpml_register_string', $string, $key, $package, sprintf( '%s %s', $string, ucfirst( $element ) ), $package->kind )compatibility/WcCheckoutAddons/class-wcml-checkout-addons.php:48 -
Ditty30,000+ installs
do_action( 'wpml_register_string', $title, "ditty_title", $package, 'ditty_title', 'LINE' )includes/translators/wpml.php:58 -
NotificationX30,000+ installs
do_action( 'wpml_register_string', $value, $key, $package, $title, $type )includes/ThirdParty/WPML.php:151 -
Advanced Coupons for WooCommerce20,000+ installs
do_action( 'wpml_register_string', $t['value'], Plugin_Constants::META_PREFIX . $t['name'], $package, $t['label'], $t['type'] )Models/Third_Party_Integrations/WPML_Support.php:284 -
Wholesale Suite20,000+ installs
do_action( 'wpml_register_string', $value, $option, $package, $title, $package['kind'] )includes/class-wwp-wholesale-prices.php:2457 -
MB Custom Post Types & Custom Taxonomies10,000+ installs
do_action( 'wpml_register_string', $settings['labels'][ $key ] ?? '', 'label_' . $key, $package, sprintf( '%s: %s', $post->post_title, $label ), 'LINE' )src/Integrations/WPML/PostType.php:68 -
Shiptastic for WooCommerce10,000+ installs
do_action( 'wpml_register_string', $value, self::get_shipping_provider_string_id( $string_name, $provider ), self::get_shipping_provider_string_package( $string_name, $provider ), $title, 'AREA' )src/Compatibility/WPML.php:170 -
WS Form LITE10,000+ installs
do_action( 'wpml_register_string', $string_value, $string_name, $this->get_package_object($form_id, $form_label), $string_title, $this->ws_form_type_convert($type) )includes/third-party/wpml/class-ws-form-wpml.php:336 -
WPML Multilingual for BuddyPress and BuddyBoss6,000+ installs
do_action( 'wpml_register_string', wp_unslash( $value ), $name, $package, $name, 'LINE' )includes/class.groupTypes.php:107 -
Themify Builder6,000+ installs
do_action( 'wpml_register_string', $field['value'], self::$package_data['post_id'] . '/' . $element_id . '/' . $field['id'], self::$package_data, isset( $field['title'] ) ? $field['title'] : '', isset( $field['type'] ) ? $field['type'] : 'LINE' )includes/plugin-compat/wpml-translation.php:1654 -
Ajaxify Comments3,000+ installs
do_action( 'wpml_register_string', $label_value, $label_key, array( 'kind' => 'Ajaxify', 'name' => 'ajaxify-comments-labels', 'title' => 'Ajaxify Comment Labels', ), $label_key, 'line' )php/Admin/Init.php:265 -
ELEX WooCommerce Product Price Custom Text (Before & After Text) and Discount2,000+ installs
do_action( 'wpml_register_string', $string_to_translate, $name, $package, $name, 'LINE' )includes/SettingsController.php:135 -
MyRewards2,000+ installs
do_action( 'wpml_register_string', $this->title, 'title', $this->getPackageWPML(true), __("Title", 'woorewards-lite'), 'LINE' )include/abstracts/event.php:890 -
Multilingual Forms for Fluent Forms with WPML2,000+ installs
do_action( 'wpml_register_string', $message, $translationKey, $this->package, 0, $type )src/Controllers/GlobalSettingsController.php:199 -
Events Manager and WPML Compatibility1,000+ installs
do_action( 'wpml_register_string', $EM_Ticket->ticket_name, 'ticket_name_'.$EM_Ticket->ticket_id, $package, $ticket_label_prefix.esc_html__('Name', 'events-manager'), 'LINE' )em-wpml-io.php:268 -
Quform WPML700+ installs
do_action( 'wpml_register_string', Quform::get($config, 'title', ''), 'form_title', $package, 'Form title', 'LINE' )library/Quform/WPML/FormTranslator.php:34 -
SaveTo Wishlist Lite600+ installs
do_action( 'wpml_register_string', $translatable_string['value'], $translatable_string['name'], $package, $translatable_string['label'], $translatable_string['type'] )Classes/Integrations/WPML_Support.php:173 -
Directorist300+ installs
do_action( 'wpml_register_string', $string['value'], $string['name'], $package, $string['title'], $string['type'] )app/Controller/Hook/Admin_Text_Translation.php:1044 -
ELEX WordPress HelpDesk & Customer Ticketing System200+ installs
do_action( 'wpml_register_string', $string_value, $string_name, $package, $string_title, $string_type )includes/class-crm-public-functions.php:4911 -
Bizdesire Advanced Connector for Hostaway80+ installs
do_action( 'wpml_register_string', $value, $name, array('domain' => self::TEXT_DOMAIN) )includes/class-hostaway-i18n.php:96 -
Integration for Breakdance and WPML20+ installs
do_action( 'wpml_register_string', $fieldValue, $stringId, $package, $field['title'], $field['editor_type'] )src/Components/BuilderIntegration/StringTranslation.php:155 -
Validation Muse for Contact Form 710+ installs
do_action( 'wpml_register_string', $value, $name, array( 'domain' => 'validation-muse-for-contact-form-7' ), $name, 'LITE' )includes/class-vmcf7-i18n-compat.php:93 -
Radas Options PageFewer than 10 installs
do_action( 'wpml_register_string', $field->get_sanitized_value(), $field->id, $this->get_wpml_package_kind(), $field->label, $type )admin/option-page.php:325
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.