Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with translating certain strings in the footer and global options of their website using the WPML plugin. Some strings are translated while others are not.
Solution:
We recommend adding a text domain to the strings that are not being translated. For example, modify your code to include the text domain like this:

<?php echo __("SUBSCRIBE", "mesa"); ?>

After updating the code, please navigate to WPML-> Theme and Plugin Localization and scan the theme or plugin that contains this code for changes to take effect. For detailed guidance, check our documentation.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.

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 3 replies, has 2 voices.

Last updated by Osama Mersal 10 months ago.

Assisted by: Osama Mersal.

Author Posts
August 7, 2024 at 11:18 am #16047601

michelleM-17

so let me sum, previous adding woo ml plugin worked,

so two things sstill:

1) in footer, some strings are translated some are not
2) how to translate strings __("String") ?
3) how to translate global options?

August 7, 2024 at 11:21 am #16047624

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

1) Please let me know how the footer is created.

2) What is the string?

3) In order to translate the hidden link">global options, please switch the language using the top admin bar language switcher and translate the strings manually.

Best regards,
Osama

August 7, 2024 at 12:00 pm #16047781

michelleM-17

footer example: <div class="mesa-top-right-footer">
<div class="mesa-subscribe">
<h3><?php echo __("SUBSCRIBE"); ?></h3>
<span><?php echo __("Stay updated with the latest news from MESA Electronic Gmbh"); ?></span>
<div class="form-newsletter-wrapper">

and the strings are in there also

3)done

August 7, 2024 at 12:04 pm #16047790

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

The code is missing the text domain. For example:

<?php echo __("SUBSCRIBE", "mesa"); ?>

Kindly check this guide.

After adding the text domain, please go to WPML-> Theme and Plugin Localization and scan the theme or plugin that contains this code.

Best regards,
Osama