Magento 2 translation problem (my locale is set to en_US):
I want to change the "Email" label on the Contact Us page to "Email Address:". However, I DO NOT WANT the "Email" label changed anywhere else.
The Contact Us page URL is
https://[your m2 site]/contact/
One of the form entry fields is Email. The label translation is "Email".
When you examine
vendor/magento/module-contact/i18n/en_US.csv I can see Email, Email in there. Obviously, I can't change it here.
We also have "Email" listed in other areas like
vendor/magento/module-customer/i18n/en_US.csv. For example, when you browse to the customer account login page you will see it uses the translation from this file. That's fine. I don't want that to change.
So how can I use/extend Magento 2 to help me change JUST the Contact Us page "Email" label via i18n translations?
- If I create a Storefront Inline Translation that's a global change across the whole site (i.e. "Email" label changes on all pages). No good.
- If I create a language pack and store the csv file under
app/i18n/[THEME]/[locale]/...the change in there is global too. No good.
- If I create a an i18n csv file under our theme i.e.
app/design/frontend/[THEME]/default/i18n/en_US.csvit changes all translations across the site. No good.
So how can I pinpoint my change without having to interfere with vendor/magento?
When reading the guides zooming in on language packages (http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.html) I tried following the steps there.
When I ran the command
bin/magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY
it created new xx_YY.csv files across all vendor/magento/ modules that I made reference to in Step 1. Is this correct? For example, I can now see:
If I now register this language pack maybe that is the only way to fix it? It doesn't feel right.
- I also tried creating an
app/design/frontend/[THEME]/default/Magento_Contact/i18nfolder with my en_US.csv file in there. No joy either.