0

How to change checkout page label state/province to Delivery location anyone help meenter image description here

2
  • Very urgent anyone help me
    – Manu
    Mar 18, 2020 at 8:29
  • which version you are using it?
    – Jinesh
    Mar 18, 2020 at 8:31

2 Answers 2

1

I have assume that your magento version 2. So check below answer.

Translation for State/Province and Zip/Postal Code is found (by default) in /vendor/magento/module-checkout/i18n directory.

You can copy locale's csv file from /vendor/magento/module-checkout/i18n folder to app/code/Magento/module-checkout/i18n directory.

Then find the text and change its translation.

After saving file, don't forget to remove content from /var/cache folder and /var/page_cache folder
0

You can use this below way :

Create di.xml file at app/code/Vendor/Module/etc/frontend/di.xml :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="checkout_lbl_change" type="Vendor\Module\Plugin\LayoutProcessor" sortOrder="1"/>
    </type> 
</config>

Create LayoutProcessor.php file at app/code/Vendor/Module/Plugin/LayoutProcessor.php :

<?php

namespace Vendor\Module\Plugin;

class LayoutProcessor
{
    public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array $jsLayout
    ) {
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
        ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['region_id']['label'] = __('Delivery location');

        return $jsLayout;
    }
}

Output :

enter image description here

8
  • unfortunately is not working
    – Manu
    Mar 18, 2020 at 12:30
  • Did you clean cache? Mar 18, 2020 at 12:35
  • yes sir cache and flush are already cleaned but no change
    – Manu
    Mar 18, 2020 at 12:37
  • my version is 2.3.4 is it possibile??
    – Manu
    Mar 18, 2020 at 12:40
  • Yes. Plugin work in all version. Maybe it's theme related issue. Not sure. Mar 18, 2020 at 12:51

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.