0

I want all 'Tax' changed with 'VAT' in the product and categorie page? but I can't find the file(s) to change it in. Does anyone know witch css file the translation is and in witch file the are called?

Solved : without languagepack for en_GB the overwrite voor en_GB isn't working. After installing languagepack the overwrite's works.

5
  • You can add "TAX" to "VAT" direct in language translation file, it will affect in whole site. Jun 11, 2018 at 9:21
  • Thanks, but which file you referring to? I made changes to 6 files but not any result
    – MaartenV1
    Jun 11, 2018 at 10:16
  • app/design/frontend/{themepackage}/{themename}/i18n/en_US.csv Jun 11, 2018 at 12:30
  • If your site is multi store then add translation in whole store. Jun 11, 2018 at 12:30
  • Can you be clear? What do I put in de en_GB.csv file ?
    – MaartenV1
    Jun 11, 2018 at 12:39

1 Answer 1

0

Assuming you only have a theme in app/design/frontend/{themepackage}/{themename}/i18n/, you can create a new translation dictionary as follows:

  • Create the dictionary in the i18n folder and name it after the ISO language code you are translating to, i.e. To add a translation dictionary for German, add de_DE.csv to the i18n folder.
  • Inside de_DE.csv, add your translation string as follows: "", "" "Shopping Cart", "Warenkorb"

Now, wherever you want Magento to translate a phrase, use the double-underscore translation method: <?php echo __('Shopping Cart'); ?>

...and Magento 2 will search for the string 'Shopping Cart' in all translation dictionaries and replace it with whatever was defined in the dictionary, e.g. 'Warenkorb' in this example.

Sources: Here is an introduction to translations in Magento 2: https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/translations/xlate.html

Here is how to add translations to themes in Magento 2: https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/translations/translate_theory.html

5
  • Thanks, that I all knowing. The question is only how I can change Tax to VAT in the category and detail page. That I can't find!!
    – MaartenV1
    Jun 11, 2018 at 13:34
  • @MaartenV1 Then I would override the template for the part of the product/category page which has the translation phrase you want to change. That's the only way I can think of to use specific instances of a translation phrase. Jun 11, 2018 at 14:08
  • i totale agre, that exact what I want, but......I can't find the file or the phrase I must translate....
    – MaartenV1
    Jun 11, 2018 at 14:10
  • @MaartenV1 Have you tried enabling template hints and refreshing the page? How about grep'ping the codebase? Or using your IDE's find text in files feature? Jun 11, 2018 at 14:13
  • solved without languagepack for en_GB the overwrite voor en_GB isn't working. After installing languagepack the overwrite's works.
    – MaartenV1
    Jun 11, 2018 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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