Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 40 replies, has 2 voices.

Last updated by Andreas W. 1 year, 1 month ago.

Assisted by: Andreas W..

Author Posts
April 5, 2024 at 8:56 pm #15489893

feruzK

Ok very good. I understand you and thank you for your analysis and I will keep you informed very soon.

April 6, 2024 at 4:08 am #15490181

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Thank you, maybe you might also try to overwrite the default string from your child theme, by using something like:

Go to wp-content\themes\martfury-child\inc\backend\customizer.php.

Change the code section to:

'outofstock_text'           => array(
            'type'            => 'text',
            'label'           => esc_html__( 'Custom Out Of Stock Text', 'martfury' ),
            'section'         => 'shop_badge',
            'default'         => __('Out Of Stock', 'martfury-child' ),
            'priority'        => 20,
            'active_callback' => array(
                array(
                    'setting'  => 'badges',
                    'operator' => 'contains',
                    'value'    => 'outofstock',
                ),
            ),
        ),

Now scan your child theme for a new string and translate the string.

This ticket will remain open for 14 days, in case you need further assistance.

April 7, 2024 at 2:00 am #15491056

feruzK

Hello Andreas,

Thank you very much.

Indeed, I replaced the code with the code you sent me and I scanned the child theme and found the Out of stock string but when I translated it, the translation was not taken into account.

Then I tried to translate the Out of stock string from WooCommerce, the translation was taken into account on Frontend when I activate the Look for strings while pages are rendered option but if I don't activate it, the translations that have been done, we can't see on Frontend.

Thank you for your answer.

April 9, 2024 at 1:53 pm #15499548

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Can you please confirm if this issue only occurs if your Child Theme is used or does this issue also occur when using the Martfury Parent Theme?

If this Martfury Parent Theme causes the same issue, then we should try to recreate the issue on a new test site, in which I need you to install the latest version of the theme.

If we can recreate the issue then we can take a closer look into this and try to reach out to the theme author to solve the issue.

I will provide a WPML test site for this purpose on which you will need to install the latest version of the theme and recreate the issue with one simple product example.

1) Please test if you can recreate this using the parent theme

2) Let me know if you can install the parent theme for testing on our test site

Best regards
Andreas

April 12, 2024 at 5:14 am #15511293

feruzK

Hello Andreas,

I hope you're doing well.

Indeed, I always use the child theme and my parent theme I always update and it is currently up to the latest version.

Then I contacted the theme author, they asked me to ask you the following question:

Can you please contact WPML plugin to ask how to sync the language file? It means when you change the text of Out of stock, the text on the string translation doesn't change

So, they are waiting for your answer to their question.

Thanks for your answer.

April 12, 2024 at 3:47 pm #15513493

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

This topic is handled inside the following documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

In this case, I would suggest using this option:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#enable-auto-register-strings

Best regards
Andreas

April 13, 2024 at 12:31 am #15514344

feruzK

Hello,

Thanks for your answer
.
Ok, great and I'll pass your message on to the theme author and I'll keep you posted.

Thank you so much!

April 13, 2024 at 10:45 am #15514722

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Another way would be to go to WPML > Theme & Plugin Localization and scan the theme for new strings. The downside is that this will register all theme strings on WPML > String Translation, which means even those strings that you might not need to translate.

Further, if the author updates language files that are coming with the theme, then a dialog should pop up at the top of WPML > Theme and Plugin Localization. The dialog indicates that WPML found new plugins or themes and needs to create its custom language files.

Completing this dialog will create custom language files for WPML's String Translation inside the folder /wp-content/languages/wpml/.

If any further assistance from our side is needed, please let me know.

April 15, 2024 at 5:43 am #15517034

feruzK

Hello Andreas,

I hope you're doing well.

Ok, thank you for this information.

Indeed, I received the response from the author of the theme and they told me that the out of stock string is found in wpml.config but they do not know why the translation is not taken into account. I send you their message :

We checked the theme and this out of stock field is in wpml.config but we don't know why it doesn't work. But on sale works fine. Can you please contact WPML to resolve ?

Now, what steps should I take to resolve the problem?

Thanks for your answer.

April 16, 2024 at 3:09 pm #15526730

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Did you already try to edit this default string on the backend, or is there not any field that lets you customize this string?

I am asking, as I did not find such a field on your site.

I would suggest that you install the latest version of the theme on the following test site and we try to recreate the issue. From there we can take further internal steps.

Please install the latest version of Martfury Theme here:

One-Click-Login:
hidden link

Leave me a comment on this ticket once the theme is installed.

April 17, 2024 at 9:20 am #15530501

feruzK

Hello Andreas,

Thanks for your reply.

To change the default string you mean change the word Out of stock from wp-content\themes\martfury\inc\backend\customizer.php. ? If so, yes I modified it, then I scanned it but the translation did not take into account.

As you told me I installed the latest version of the theme on the test site and you can view it.

Then I noticed one thing the translation for string Out of stock was translated to the French language for example for the status of the product and I am sending you the screenshot you can see.

Thanks for your answer.

Capture d’écran 2024-04-17 à 11.24.00.png
April 17, 2024 at 4:08 pm #15533954

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The translation appears to work on my test site. See screenshot.

I will revise the issue again on your site and then get back to you.

test.png
April 17, 2024 at 11:05 pm #15535098

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies, but sadly I no longer have the local copy of your site available, which I created some days ago. Further, the earlier provided access credentials are no longer available.

Could you provide admin access to your site again, so that I can keep investigating this issue?

The private reply form is enabled again.

April 18, 2024 at 6:49 pm #15540864

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Sorry, but I changed my mind about taking the copy for now.

Instead, I would like to ask you to upload your Child Theme on my test site.

(I tried to do it myself, but the file manager plugin(s) are not working as expected on your site)

Link to the test site:
hidden link

Please upload your Child Theme using the File Manager Plugin and leave me a comment on this ticket.

April 18, 2024 at 11:31 pm #15541380

feruzK

Hello Andreas,

Thanks for your reply.

Ok I understand, there is no problem and I installed the child theme on the test site.

Thanks for your answer.

The topic ‘[Closed] String Translation’ is closed to new replies.