Question

I'm trying to change "Excl. Tax:" to "Excl. Vat:" and have created a CSV file called en_GB.csv which contains the line - "Tax:", "Vat:".

I've saved and uploaded this to app/design/frontend/Magento/luma/i18n/en_GB.csv.
The translation hasn't worked as my store still shows "Excl. Tax".
I've deployed static files and run the upgrade command too.
Not too sure what to try next?

Was it helpful?

Solution

If the manual translation doesn't work, you can try Magento generation of translation dictionary by collecting translatable phrases in Magento 2.3.x.

Since you are configuring a Magento store in en_GB language. You can collect translatable phrases through this command:

php bin/magento i18n:collect-phrases --output "app/i18n/Magento/en_GB.csv" --magento  

After running the above command, you can check and open the file with the collected translatable phrases from this path app/i18n/Magento/en_GB.csv
From there you can find and replace every "Excl. Tax" translatable phrase.
After you finish changing those words, you should run below command:

php bin/magento i18n:pack app/i18n/Magento/en_GB.csv -d en_GB  

Flush cache. And your changes will reflect in the frontend.

OTHER TIPS

You need to use full phrase (this one was without ":") :

"Excl. Tax","Excl. Vat"

because it's

data-label="<?php echo $block->escapeHtml(__('Excl. Tax'));?>">

and if You translate for options:

"Excl. Tax:","Excl. Vat:"

its always need to be exact phrase.

Another example from Module_Tax

"Excl. tax:","Excl. VAT:"

Remember to not add spaces between ","

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top