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: Documentation request
This topic contains 1 reply, has 0 voices.
Last updated by myleneG 1 month, 3 weeks ago.
Assisted by: Otto.
| Author | Posts |
|---|---|
| October 3, 2025 at 1:12 pm #17454507 | |
|
myleneG |
Background of the issue: Symptoms: Questions: |
| October 3, 2025 at 3:51 pm #17454946 | |
|
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Take a looks at this documentation please: Then follow these steps: Step 1: Replace your snippet with a gettext-ready version using your child theme text-domain (e.g. funique-child or similar). add_filter( 'woocommerce_shipping_package_name', function( $title, $i, $package ) {
/* translators: %d is the sequential package number starting at 1 */
$pattern = esc_html_x( 'Delivery %d', 'shipping package title', 'funique-child' );
return sprintf( $pattern, $i + 1 );
}, 20, 3 );
Why: WPML will scan your child theme and register Delivery %d under your domain instead of “woocommerce”. Step 2: WP Admin → WPML → Theme and plugins localization → scan your child theme. Step 3: WP Admin → WPML → String Translation → find domain funique-child, translate “Delivery %d” into French (you can drop %d if you don’t need the number, the extra sprintf arg is safely ignored): Step 4 (optional): If the string doesn’t appear, enable Auto register strings temporarily and reload the cart/checkout once, then translate it: Best Regards, |
| October 3, 2025 at 6:29 pm #17455204 | |
|
myleneG |
Thank you very much, I had trouble with step 1! |