How can I set the name of a product in a specific language (store view)?

  • Have you tried setting $product->setStoreId($anotherStoreId); before saving? Mar 25, 2016 at 20:20
  • Thanks! I'll try that in a couple of days. But I can tell you now: it feels weird because it's not part of ProductInterface. Mar 26, 2016 at 0:17
  • no reply? how to do that?
    – LucScu
    Dec 28, 2016 at 10:06

1 Answer 1


Please try with below code, to create custom script in root, than add below code in script :


use Magento\Framework\App\Bootstrap;

require __DIR__ . '/../app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');

$product = $obj->get('Magento\Catalog\Model\Product');

    ->setName('demo name ')
    ->setStatus(2)// Disabled
    ->setWebsiteIds([1, 2])

echo "Saved product ID " . $product->getId() . "\n";

please check its work for me...

  • It will save the same value for all store view. Dec 7, 2021 at 6:18

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.