1

Is it possible to change the name of the of 'Products' to 'Projects' & Variants to 'Pledges'? I would like to use the Commerce CMS as a base to start from but need to be able to change certain naming of sections. Where can I do this?

3

You can do this using a custom translations file for Commerce and override some of the default translation strings.

  1. Go to vendor/commerce/translation/[your-language].php
  2. Review the instances of the word you want to translate (could be a lot)
  3. In your project root, create a directory called translations
  4. Inside of this directory create a directory with your language code (for me it's en).
  5. Inside of the language directory create a file called commerce.php.

In commerce.php start with something like this:

<?php 
  return [
     'Products' => 'Projects' 
  ];

And keep going until you have all the strings you want translated added.

| improve this answer | |
  • Thanks! This helped me a lot! – Kap1tein Feb 7 at 15:06
1

Commerce 3.0 introduces the ability to rename the Product Title and Variant Title when creating a product type.

| 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.