Jump to content

PayPal translate: "Pay with your card or your PayPal account"


JensenDalgaard

Recommended Posts

Can someone please help with the translation of the text "Pay with your card or your PayPal account" - See the enclosed screenshot.

 

The text occurs during checkout - where you can decide on your method of payment (Bank wire or PayPal).

 

The topic has been discussed before but the proposed solution does not work.

 

Kind regards

BeMike

Denmark

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 2 months later...

Also doesn't work for Hungarian language (using the latest PrestaShop and PayPal module).

I had to edit the .tpl file:

http://ctrlv.in/420107

 

I commented out the original not working code part (marked with red arrow).
 

You can also override the tpl file:

http://www.prestashop.com/forums/topic/201446-translate-pay-with-card-or-paypal-account/?do=findComment&comment=1359223

Edited by EnsoSzL (see edit history)
Link to comment
Share on other sites

@kmorgen, the phrase we are all looking for translating does not exist in the translation page you mention. This phrase only exists in the translations.xml file, which does not seem to work if edited. The phrase is not "Pay with Paypal", but "Pay with your card or your PayPal account". These are 2 different phrases. In other words, even if I change the phrase "Pay with Paypal" through the translation page, the phrase "Pay with your card or your PayPal account" will remain english by default. Actually in your site, the phrase is "Pay with your Card (Visa, MasterCard etc.) or PayPal account" - in english.

 

The following worked for me, 1.6.0.9, paypal 3.7.2. - thank you EnsoSzL.

 

Edited by marboo (see edit history)
Link to comment
Share on other sites

  • 3 months later...

I had the same problem and I found a function in papypal.php called getCountryDependency:

public function getCountryDependency($iso_code)
{
    $localizations = array(
        'AU' => array('AU'), 'BE' => array('BE'), 'CN' => array('CN', 'MO'),
        'CZ' => array('CZ'), 'DE' => array('DE'), 'ES' => array('ES'),
	'FR' => array('FR'), 'GB' => array('GB'), 'HK' => array('HK'),
        'IL' => array('IL'), 'IN' => array('IN'), 'IT' => array('IT', 'VA'),
	'JP' => array('JP'), 'MY' => array('MY'), 'NL' => array('AN', 'NL'),
        'NZ' => array('NZ'), 'PL' => array('PL'), 'PT' => array('PT', 'BR'),
	'RA' => array('AF', 'AS', 'BD', 'BN', 'BT', 'CC', 'CK', 'CX', 'FM', 'HM', 'ID', 'KH', 'KI', 'KN', 'KP', 'KR', 'KZ', 'LA', 'LK', 'MH', 'MM', 'MN', 'MV', 'MX', 'NF', 'NP', 'NU', 'OM', 'PG', 'PH', 'PW', 'QA', 'SB', 'TJ', 'TK', 'TL', 'TM', 'TO', 'TV', 'TZ', 'UZ', 'VN', 'VU', 'WF', 'WS'),
	'RE' => array('IE', 'ZA', 'GP', 'GG', 'JE', 'MC', 'MS', 'MP', 'PA', 'PY', 'PE', 'PN', 'PR', 'LC', 'SR', 'TT', 'UY', 'VE', 'VI', 'AG', 'AR', 'CA', 'BO', 'BS', 'BB', 'BZ', 'CL', 'CO', 'CR', 'CU', 'SV', 'GD', 'GT', 'HN', 'JM', 'NI', 'AD', 'AE', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AT', 'AW', 'AX', 'AZ', 'BA', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BV', 'BW', 'BY', 'CD', 'CF', 'CG', 'CH', 'CI', 'CM', 'CV', 'CY', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ET', 'FI', 'FJ', 'FK', 'FO', 'GA', 'GE', 'GF', 'GH', 'GI', 'GL', 'GM', 'GN', 'GQ', 'GR', 'GS', 'GU', 'GW', 'GY', 'HR', 'HT', 'HU', 'IM', 'IO', 'IQ', 'IR', 'IS', 'JO', 'KE', 'KM', 'KW', 'KY', 'LB', 'LI', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MD', 'ME', 'MF', 'MG', 'MK', 'ML', 'MQ', 'MR', 'MT', 'MU', 'MW', 'MZ', 'NA', 'NC', 'NE', 'NG', 'NO', 'NR', 'PF', 'PK', 'PM', 'PS', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SC', 'SD', 'SE', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'ST', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TN', 'UA', 'UG', 'VC', 'VG', 'YE', 'YT', 'ZM', 'ZW'),
        'SG' => array('SG'), 'TH' => array('TH'), 'TR' => array('TR'),
        'TW' => array('TW'), 'US' => array('US'));

    foreach ($localizations as $key => $value)
	if (in_array($iso_code, $value))
		return $key;

    return $this->getCountryDependency(self::DEFAULT_COUNTRY_ISO);
}

as u can see there are many countries under 'RE' so if your localization is set something from that array you will get the translation for 'RE' from the translations.xml

so u can remove your country from that array and make a new for it.

'HU' => array('HU'),

after that you make a new country entry in the translations.xml with your country's iso code
 

<country iso_code="HU">
    <yes>Yes</yes>
    <no>No</no>
    <payment_choice>Pay with your card or your PayPal account</payment_choice>
    <leader>Leader in</leader>
    ....

Sorry for my english :/

  • Like 2
Link to comment
Share on other sites

 

I had the same problem and I found a function in papypal.php called getCountryDependency:

public function getCountryDependency($iso_code)
{
    $localizations = array(
        'AU' => array('AU'), 'BE' => array('BE'), 'CN' => array('CN', 'MO'),
        'CZ' => array('CZ'), 'DE' => array('DE'), 'ES' => array('ES'),
	'FR' => array('FR'), 'GB' => array('GB'), 'HK' => array('HK'),
        'IL' => array('IL'), 'IN' => array('IN'), 'IT' => array('IT', 'VA'),
	'JP' => array('JP'), 'MY' => array('MY'), 'NL' => array('AN', 'NL'),
        'NZ' => array('NZ'), 'PL' => array('PL'), 'PT' => array('PT', 'BR'),
	'RA' => array('AF', 'AS', 'BD', 'BN', 'BT', 'CC', 'CK', 'CX', 'FM', 'HM', 'ID', 'KH', 'KI', 'KN', 'KP', 'KR', 'KZ', 'LA', 'LK', 'MH', 'MM', 'MN', 'MV', 'MX', 'NF', 'NP', 'NU', 'OM', 'PG', 'PH', 'PW', 'QA', 'SB', 'TJ', 'TK', 'TL', 'TM', 'TO', 'TV', 'TZ', 'UZ', 'VN', 'VU', 'WF', 'WS'),
	'RE' => array('IE', 'ZA', 'GP', 'GG', 'JE', 'MC', 'MS', 'MP', 'PA', 'PY', 'PE', 'PN', 'PR', 'LC', 'SR', 'TT', 'UY', 'VE', 'VI', 'AG', 'AR', 'CA', 'BO', 'BS', 'BB', 'BZ', 'CL', 'CO', 'CR', 'CU', 'SV', 'GD', 'GT', 'HN', 'JM', 'NI', 'AD', 'AE', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AT', 'AW', 'AX', 'AZ', 'BA', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BV', 'BW', 'BY', 'CD', 'CF', 'CG', 'CH', 'CI', 'CM', 'CV', 'CY', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ET', 'FI', 'FJ', 'FK', 'FO', 'GA', 'GE', 'GF', 'GH', 'GI', 'GL', 'GM', 'GN', 'GQ', 'GR', 'GS', 'GU', 'GW', 'GY', 'HR', 'HT', 'HU', 'IM', 'IO', 'IQ', 'IR', 'IS', 'JO', 'KE', 'KM', 'KW', 'KY', 'LB', 'LI', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MD', 'ME', 'MF', 'MG', 'MK', 'ML', 'MQ', 'MR', 'MT', 'MU', 'MW', 'MZ', 'NA', 'NC', 'NE', 'NG', 'NO', 'NR', 'PF', 'PK', 'PM', 'PS', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SC', 'SD', 'SE', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'ST', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TN', 'UA', 'UG', 'VC', 'VG', 'YE', 'YT', 'ZM', 'ZW'),
        'SG' => array('SG'), 'TH' => array('TH'), 'TR' => array('TR'),
        'TW' => array('TW'), 'US' => array('US'));

    foreach ($localizations as $key => $value)
	if (in_array($iso_code, $value))
		return $key;

    return $this->getCountryDependency(self::DEFAULT_COUNTRY_ISO);
}

as u can see there are many countries under 'RE' so if your localization is set something from that array you will get the translation for 'RE' from the translations.xml

 

so u can remove your country from that array and make a new for it.

 

'HU' => array('HU'),

 

after that you make a new country entry in the translations.xml with your country's iso code

 

<country iso_code="HU">
    <yes>Yes</yes>
    <no>No</no>
    <payment_choice>Pay with your card or your PayPal account</payment_choice>
    <leader>Leader in</leader>
    ....

Sorry for my english :/

 

Excellent post - That's solved the problem in a much easier way. Thanks!!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...