0

How can I override the following file:

vendor/magento/framework/Locale/Format.php

  • 2
    Do you really want to take ownership of a framework file? You can override any public method with a plugin. What are you trying to accomplish? – Shawn Abramson Jan 7 '18 at 15:42
  • Actually, I am trying to override group and decimal symbols. I did that in ar_SA.xml. It worked for product list but on product page it is getting back to original due to some javascript. When I looked for the solution, I found this file to be modified, and it worked - but I had to change the core flle. But I want to override it rather than changing it. – Abid Malik Jan 9 '18 at 4:48
  • Unfortunately, the way you are doing this is not best practice and by modifying the file directly or even just overriding the file, you are ensuring that you miss out on future upgrades. You'd be much better off with a "plugin" method which would allow you to accomplish your goal and keep everything upgradeable. – Shawn Abramson Jan 9 '18 at 13:33

Your Answer

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

Browse other questions tagged or ask your own question.