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: 

This topic contains 1 reply, has 2 voices.

Last updated by Bruno 3 weeks ago.

Assigned support staff: Bruno.

Author Posts
September 23, 2019 at 8:30 am #4621579

alekG

Dear WPML Team,

I added the following line to my child theme:

<a href="<?php echo esc_url( dokan_get_navigation_url('settings/regular-shipping' ) ); ?>">Click here if you have not yet made any basic settings for shipping.</a>

It is just a link leading to my shipping settings. The link is correctly translated, so If I click on it on my German page it leads to German shipping settings and if I click on it on my English page it leads to English.

However I cannot find the text "Click here if you have not yet made any basic settings for shipping." in my string translations, although I already used string and plugin localization. So my question: How can I translate this sentence?

Best regards

Alek Green

September 23, 2019 at 1:57 pm #4624791

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for contacting us. To translate this string you need to use some WordPress gettext function, such as _e(). For example:

<a href="<?php echo esc_url( dokan_get_navigation_url('settings/regular-shipping' ) ); ?>"><?php _e( 'Click here if you have not yet made any basic settings for shipping.', 'custom_string'); ?></a>

Then follow the steps below:

- Click on the WPML > Theme and plugins localization
- Select the theme or plugin (where the code above was entered)
- Click on the Scan button
- Click on the WPML > String Translation and translate the string

Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.

Thank you.