You want to replace “Related products” with “Use with” or “Search entire store here…” with “Search…”. Here is how to create a new language pack like en_GB where you will insert all your translations:

Create path /app/i18n/magento/uk_gb/.

In that folder create 4 files:

  • composer.json
  • 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
    {
    "name": "magento/uk_gb",
      "description": "English",
      "version": "100.0.1",
      "license": [
        "OSL-3.0",
        "AFL-3.0"
      ],
      "require": {
        "magento/framework": "100.0.*"
      },
      "type": "magento2-language",
      "autoload": {
        "files": [
          "registration.php"
        ]
      }
    }
    
  • uk_GB.csv
  • 1
    
    "Related Products","Use with:"
    
    Here of course you insert other translations.
  • language.xml
  • 1
    2
    3
    4
    5
    6
    7
    8
    
    <?xml version="1.0"?>
    <language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
        <code>en_GB</code>
        <vendor>limesharp</vendor>
        <package>en_gb</package>
        <sort_order>100</sort_order>
        <use vendor="oxford-university" package="en_us"/>
    </language>
    
    We've used en_us as the parent language.
  • registration.php
  • 1
    2
    3
    4
    5
    6
    7
    8
    9
    
    <?php
    
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
        'magento_uk_gb',
        __DIR__
    );
    
    ?>
    

Bare in mind that the language code is case sensitive. Path, registration and vendor are uk_gb, but csv and language code is uk_GB.

If you want to use translations in your module, you just create a i18n folder there and add your csv file.

The numeronym i18n comes from Internationalization, 18 being the number of letters between the first i and the last n. The idea behind internationalization is that an application should potentially be adapted to various languages without the need to touch the code. Magento2 does well here.