Magento 2 Translation Templates Override/Replace

Create Custom Theme based on parent theme

Let’s say we will create a custom theme based on Magento/luma as parent. We have to create three required files to add custom theme in magento 2 under directory apps/design/frontend/Silumansupra/default

  • theme.xml
  • registration.php
  • composer.json

Magento 2 Custom Theme Configuration -

So your app/design/frontend/Silumansupra/default/theme.xml

file should look something like this:

<theme xmlns:xsi="" xsi:noNamespaceSchemaLocation="../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
  <title>Custom Silumansupra</title>

Next, we have to create registration.php

<theme xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
     <title>SilumanSupra Custom Theme</title> <!-- your theme's name -->
     <parent>Magento/luma</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->

And now we create composer.json file

    "name": "silumansupra/custom",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/theme-frontend-blank": "*",
        "magento/framework": "*"
    "type": "magento2-theme",
    "version": "100.0.1",
    "license": [
    "autoload": {
        "files": [
Change Configuration Theme on backoffice

Login to your backoffice/admin page and change theme configuration at Content – Configuration.

Magento 2 Custom Theme Configuration -

Create transaction file

As we will override/replace string in Customer Login page, we have to create translation file under apps/design/frontend/Silumansupra/default/i18n

Create file en_US.csv under directory structure above.  We can create (or you can just copy paste from magento 2 default theme files). Here we will use en_US.csv file in vendor/magento/theme-frontend-luma/i18n/en_US.csv and replace some strings with our own.

For example, we will change String “Customer Login” to “Customer Login Custom” in login page.

"Customer Login","Customer Login Custom"

Magento 2 Custom Theme Configuration -

You can cache:flushafter save and change translation files in editor and then refresh the page.