1

I have a text after installing a payment module which I can not translate in any way. I have opened the magento translator but it does not include this text. How can I translate this? enter image description here

EDIT2: I have added translate line to pl_PL.csv in payment module use notepad:

"Pay using Masterpass","Zapłać kartą Masterpass"

Then I refresh page and no see any result.

Of course before refresh, I run some command:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Impossible edit name in backend: enter image description here

enter image description here

  • Use apache open office calc to edit the CSV files. That should solve it :) – Greg Mar 20 '18 at 12:27
  • @Bare Feet now this error solved but after upgrade system no see any result :( – Sylvester Mar 20 '18 at 12:37
  • It's probably because the text is not wrapped in the translate function __(). Are you not able to change the title in the Admin Payment Config? – Greg Mar 20 '18 at 12:41
  • Have a look at that also: devdocs.magento.com/guides/v2.1/frontend-dev-guide/translations/… – Greg Mar 20 '18 at 12:42
  • @Bare Feet in old module version I can change payment method title but now in new version I cannot see this. I have update my topic to show you. – Sylvester Mar 20 '18 at 12:50
1

To translate new text you can add text and its translation in module language csv file like this :

'Your Text here','Your translation here'

However in templates the left side text should be defined using magento translator function like this :

<?= /* @escapeNotVerified */ __('Your Text here') ?>
| improve this answer | |
  • I have installed language pack from GitHub via composer. Where is located .csv file language ? github.com/SnowdogApps/magento2-pl_pl – Sylvester Mar 20 '18 at 11:49
  • Ok I have founded language pack. – Sylvester Mar 20 '18 at 11:52
  • Great, just add your new text translation in relevant file ( if you have module installed then there should be translation file too there you can add translated text) – Naveed Asim Mar 20 '18 at 11:53
  • I have add new translate line to .csv file in language pack in module and I see error. Please check I update my topic. – Sylvester Mar 20 '18 at 12:06
  • There would be some encoding issue while adding text in translation file, use notepad to update the file – Naveed Asim Mar 20 '18 at 12:13
1

You can try to change it in Admin Payment Config section or else tryout in translation csv file.

| improve this answer | |
1

Try changing the payment method names in Admin > Stores > Settings > Configuration > Sales > Payment methods > [Payment method name]

You should be able to change the name of the payment method in the "Title" row.

You are able to set the title of the payment method as per store view scope.

enter image description here

Edit:

If you want to use the translation .csv method.

You can translate the text using the language csv file like this :

'Original text','Your translation'

NOTE:

The text need to be wraped in the Magento translation function:

__('Original text') 

I still believe changing the text in the admin is by far easiest option.

| improve this answer | |
  • Thanks for your try help but impossible to change name payment method in backend. – Sylvester Mar 20 '18 at 11:49
1

You can also use theme translation CSV file if you are using custom theme.

Reference: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/translations/translate_practice.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.