We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

The need:
The user wants to display different Bank Account Numbers for each language (the data is set under WooCommerce > Settings > Checkout > BACS > Account Details )

The solution:
Actually the bank account information is being saved in op_name = 'woocommerce_bacs_accounts' in the table wp_options .

According to the guide in http://wpml.org/documentation/support/language-configuration-files/ , you should add the following code in wp-content/plugins/woocommerce-multilingual/wpml-config.xml . The code is right before the ending tag . Then you can translate under WPML > String Translation

<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 name="1">
        <key name="account_name" />
        <key name="account_number" />
        <key name="bank_name" />
        <key name="sort_code" />
        <key name="iban" />
        <key name="bic" />
    </key>
</key>

In this case, I have 2 bank accounts so I have 2 key groups and

This topic contains 2 replies, has 2 voices.

Last updated by Adam 5 years ago.

Assigned support staff: Dat Hoang.

Author Posts
October 21, 2014 at 12:02 pm #496111

Adam

Hello,

I wonder how to display different checkout bank account numbers for each language version (BACS data).

I've enabled "Auto-register strings" and added lines to wpml-config.xml as explained in this thread https://wpml.org/forums/topic/woocommerce-translate-bank-details/.

Unfortunately bank account numbers still won't appear on String translation page.

I did an CSS hack to replace bank account numbers for each checkout page (bellow), but I treat it as a temporary solution, because it has many drawbacks (like the fact that text isn't selectable).

<style>
.account_number {
	visibility: hidden;
	position: relative;
}
.account_number:after {
	visibility: visible;
	position: absolute;
	top: 0;
	left: 0;
	content: "Account Number: 00000";
}
.iban {
	visibility: hidden;
	position: relative;
}
.iban:after {
	visibility: visible;
	position: absolute;
	top: 0;
	left: 0;
	content: "IBAN: PL 00000";
}
.bic {
	visibility: hidden;
	position: relative;
}
.bic:after {
	visibility: visible;
	position: absolute;
	top: 0;
	left: 0;
	content: "BIC: ABCDEFGHIJ";
}</style>

Is there a way to display different accounts for each checkout page language version without this kind of improvisation?

October 22, 2014 at 9:05 am #496777

Dat Hoang

Actually the bank account information is saved in op_name = 'woocommerce_bacs_accounts' in the table wp_options . That's different from the ticket you refer above (it's very old - over 1 year ago).

According to the guide in http://wpml.org/documentation/support/language-configuration-files/ , you should add the following code in wp-content/plugins/woocommerce-multilingual/wpml-config.xml . The code is right before the ending tag </admin-texts>. Then you can translate under WPML > String Translation

		<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 name="1">
				<key name="account_name" />
				<key name="account_number" />
				<key name="bank_name" />
				<key name="sort_code" />
				<key name="iban" />
				<key name="bic" />
			</key>
		</key>

In this case, I have 2 bank accounts so I have 2 key groups <key name="0"> and <key name="1">

October 22, 2014 at 5:49 pm #497369

Adam

It worked! Thank you 🙂