Skip Navigation

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

Problem:
The client needed to display different bank account details for customers in South Africa on their WooCommerce site using WPML. They were unable to change, translate, or display specific bank account information for the South African domain.

Solution:
First, we guided the client to register the "BACS Account details" fields for translation:

  • Go to WPML > Settings > Custom XML Configuration.
  • Insert the following code and click on "Save":
    <wpml-config>
      <admin-texts>
        <key name="woocommerce_bacs_accounts">
          </key><key name="0">
            <key name="account_name"></key>
            <key name="account_number"></key>
            <key name="bank_name"></key>
            <key name="sort_code"></key>
            <key name="iban"></key>
            <key name="bic"></key>
          </key>
        
      </admin-texts>
    </wpml-config>
    
  • Then, go to "WooCommerce > Settings > Payments > Direct Bank Transfer" and re-enter the bank account details. Save the changes.
  • Finally, go to "WPML > String Translation" and update the translation of the Account details.

For the email template translation issue, we instructed the client to scan the child theme for strings, as the text was part of a custom WooCommerce template:

  • Go to WPML > Theme and Plugin Localization.
  • Select the "Avada Child" theme and scan the theme for strings.
  • After the scan is completed, go to String Translation and search for the text to translate it.

If the solution provided is not relevant due to being outdated or not applicable to your case, we recommend opening a new support ticket. We also highly recommend checking related 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 contact our support forum.

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.

This topic contains 13 replies, has 3 voices.

Last updated by Prosenjit Barman 1 year, 3 months ago.

Assisted by: Prosenjit Barman.

Author Posts
February 21, 2024 at 3:45 am #15325164

Alex

Dear WPML Team,

We are using WPML for our Shop heatness.at to have different domains and languages in different countries: heatness.de, heatness.ch and now also heatness.co.za.

In the E-Mail the Customer receives when choosing "direct bank transfer" he can see also the Bank Account Data for the transfer.
We need to provide different Bank Account Data here for our customers in South Africa for heatness.co.za. Unfortunately I can see no possibility to

- change the information for heatness.co.za, or to
- translate the bank account infos, or to
- find any way to just show a different information for customers of heatness.co.za

Yes, I could also add the South African Bank to "Direct bank transfer" but this will confuse customers, as they see different accounts.
What we need is to show just the specific details for this country - only the South African Bank in the South African Mail.

Can you help me with my issue?
For me any solution is fine - also if you send me some css or code with details where to use it.

Thank you!
Greetings
Alex

Bildschirmfoto 2024-02-21 um 04.36.42.png
February 21, 2024 at 3:51 am #15325179

Alex

PS As the site is live and at the moment no orders should be placed on heatness.co.za, I chose to not display the order buttons, etc.
But I think it is not relevant for my question anyway, to be able test the order and mail function. If you need to, just tell me - then I can change that for testing.

February 21, 2024 at 8:13 pm #15330355

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

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

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.

If you visit the Direct Bank Transfer payment settings in WooCommerce, you can choose the language of the input field to the one you wish (see attached screenshot)

I hope this helps.

WooCommerce settings _ Sandbox _ WordPress.jpeg
February 22, 2024 at 1:36 am #15330860

Alex

Hi Lucas,
Thx!
Unfortunately it does not help, because there is no field to choose the language for "Account name" "Account number" etc.
Greeetings!
Alex

February 23, 2024 at 7:27 am #15336156

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Alex,
I hope you're doing well. I've taken over this ticket and will try my best to assist you in this matter.

I hope the guidance provided by my colleague Lucas helped in translating Bank information properties. Now, if you want to translate the "Account Name" and "Account Number" details, you should be able to do that from the String Translation section. Here are the steps to follow:

- First, ensure you resave the Bank details you've previously inputted.
- Navigate to "WPML > String Translation."
- At the bottom of the page, there's a link titled "Translate texts in admin screens »". Please click on this link.
- On the Admin screen page, search for "woocommerce_bacs_accounts."
- The top result should display options including the Account Name and Account Number. Please select these options and then click on "Add to String Translation" (screenshot: hidden link).
- Once you've registered the strings for translation, return to "WPML > String Translation."
- Here, you can translate the Account Name and Account Number by clicking on the "+" icon next to each, according to your requirements.

For more details on registering strings for translation, please check this link: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#translate-admin-and-settings-strings

I hope the steps will help. But, feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

February 23, 2024 at 8:07 am #15336259

Alex

Hi Prosenjit,

Thx for your reply! Unfortunately the changes you described seem not to work for the E-Mails. Please take a look at the screens attached. I changed many details like Bank - but it did not work. I changed also the Company Name (in Bank details) -> That did work, it is now Silverboom (Pty) Ltd which is correct...but not the other stuff.
Any idea?

Bildschirmfoto 2024-02-23 um 09.05.49.png
Bildschirmfoto 2024-02-23 um 09.04.54.png
February 26, 2024 at 4:42 am #15342111

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Alex,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Thank you for trying out the suggestion. I have checked in my development environment an found that we have to register the "BACS Account details" fields for translation so that the data entered within those fields appears properly translated in another language. Please try the following and I hope it will help.

- Please go to WPML > Settings > Custom XML Configuration
- Insert the following code and click on "Save"

<wpml-config>
  <admin-texts>
    <key name="woocommerce_bacs_accounts">
      <key name="0">
        <key name="account_name" />
        <key name="account_number" />
        <key name="bank_name" />
        <key name="sort_code" />
        <key name="iban" />
        <key name="bic" />
      </key>
    </key>
  </admin-texts>
</wpml-config>

- Once added, please go to "WooCommerce > Settings > Payments > Direct Bank Transfer" and add the Bank account details again. Save the changes.
- After that, go to "WPML > String Translation" and update the translation of the Account details.

I hope the steps above will help to solve the issue. But, if you need further assistance, feel free to let me know. I will be happy to help.

Best regards,
Prosenjit

February 26, 2024 at 7:22 am #15342384

Alex

Hi Prosenjit,

Thx!
Good idea - but something does not work properly. 🤷🏻‍♂️
I tried it several times:

- First time it mixed up with the second bank account we use for German customers
- Then I did everything again
- and a third time

It does not work.
See screens - it does not translate in the Mail...even though the first time it translated some but mixed up.

Maybe mixing up with <key name="0"> ...does this affect the first entry in Account Details? Or does it affect the data I entered? Or has it not got to do with that in anyway?

Maybe we could try some totally new entry with key "3" or "4" - Somehow it does not work..... Thx!

Bildschirmfoto 2024-02-26 um 08.04.53.png
February 26, 2024 at 7:51 am #15342453

Alex

PS

Bildschirmfoto 2024-02-26 um 08.49.51.png
Bildschirmfoto 2024-02-26 um 08.50.28.png
Bildschirmfoto 2024-02-26 um 08.50.39.png
February 27, 2024 at 3:27 am #15346968

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Alex,
Thank you for the update.

I tested the code in my development environment before sharing and can confirm that the Account information appears translated when the purchase is made in the 2nd language. The key value doesn't seem to be an issue here.

However, since the issue persists on your end, a closer inspection will be required to understand the root cause of the issue. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

February 28, 2024 at 8:43 am #15352403

Alex

Hi Prosenjit,

Thx for your offer!
Before taking it, I tried again your instruction for the 4th time - and: it worked 👍🏻 😀

Thx very much - this part is solved.
But I have a second issue - same problem - concerning also the information in the first E-Mail the client receives, that is not translated and I do not know how to.

In the Mail Template customer-on-hold-order.php (Screen 1) I changed the English sentence some months ago to "vielen Dank für Ihre Bestellung. Wir warten mit der Verarbeitung, bis wir bestätigen können, dass die Zahlung eingegangen ist."

Now I need a Translation just for South Africa - but it does not work.

Do I have to use also some Custom XML like maybe:

<wpml-config>
<admin-texts>
<key name="[bsr_data]">
<key name="search_for" />
</key>
</admin-texts>
</wpml-config>

I tried, but did not work. Any idea what I can do?
Can it be translated and is that the right idea? Thx for your help!

Thx
Alex

Bildschirmfoto 2024-02-28 um 09.40.04.png
Bildschirmfoto 2024-02-28 um 09.39.49.png
Bildschirmfoto 2024-02-28 um 09.37.42.png
Bildschirmfoto 2024-02-28 um 09.34.42.png
February 29, 2024 at 3:42 am #15356255

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Alex,
Thank you for the update. Glad to hear that the issue with translating account details is solved now.

For the text that you want to translate - Based on the screenshot, I noticed that the text is registered under the "WooCommerce" text domain, but you've translated a text from the "Admin BSR Data" text-domain. Which is why, that text is not showing translated.

Please try the following:

- Please go to WPML > Theme and Plugins localization
- Select the "WooCommerce" plugin and Scan the plugin for strings. You'll see a button at the bottom of the section.
- Once the Scan is completed, please go to "WPML > String Translation" and search for that text.
- Check if there are any entries listed under the 'WooCommerce' text domain. If you find that, translate the text.

Please let me know how it goes. If you need further assistance in this matter, I will be happy to help.

Best regards,
Prosenjit

March 1, 2024 at 8:20 am #15361296

Alex

Hi Prosenjit,

Thx for your answer!
Unfortunately it does not work that way... I can find three texts that are similar -- please take a look at the screenshot.
But only the Admin BSR Data text contains "vielen Dank" - the others say "Vielen Dank"... anyway: they are all translated - it does not change anything.

Do you have any idea how to solve that?

Maybe its a problem and I am searching for the wrong string... because it is a text in a mail, that I changed manually form English to German many months ago... and its a text directly in the template code.... 🤷🏻‍♂️

Greetings
Alex

Bildschirmfoto 2024-03-01 um 09.12.38.png
March 1, 2024 at 10:36 am #15362314

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Alex,
Thank you for the update.

I realized I missed a key point: the text is part of a custom WooCommerce template included in the child theme. Thus, rather than looking for strings in the WooCommerce plugin, you should perform a scan of the child theme. Once you do this, the string should show up in the String Translation section.

- Please go to WPML > Theme and Plugin Localization
- Select the "Avada Child" theme and scan the theme for the string
- Once the Scan is completed, please go to String Translation and check if that text appears in the result.

But, if the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

March 1, 2024 at 12:25 pm #15362896

Alex

Thx! Solved!