cancel
Showing results for 
Search instead for 
Did you mean: 

How to translate <title> content?

How to translate <title> content?

How to translate "Forgot Your Password"?

 

Code:

<!--
vendor/magento/module-customer/view/frontend/layout/customer_account_forgotpassword.xml
-->

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <title>Forgot Your Password</title> </head> <body> <referenceBlock name="root"> <action method="setHeaderTitle"> <argument translate="true" name="title" xsi:type="string">Password forgotten</argument> </action> </referenceBlock> <referenceContainer name="content"> <block class="Magento\Customer\Block\Account\Forgotpassword" name="forgotPassword" template="Magento_Customer::form/forgotpassword.phtml"> <container name="form.additional.info" as="form_additional_info"/> </block> </referenceContainer> </body> </page>

Front end:

bilde.png

1 REPLY 1

Re: How to translate <title> content?

Hello @phantonym 

 

Magento 2 is provided by default translation option using ADMIN. you no need to change on any PHP or PHTML file. 
Note: As per Magento coding standard you have used Magento admin option OR you have to create a language pack for translation. Below steps are using Magento ADMIN Options.

If you are in a development mode. Please follow the below steps.

  1. Magento admin > Store > Configuration > Advance > Developer > Translate Inline > Enabled for Storefront as YES 
  2. Refresh the Cache.
  3. GOTO Front and refresh the forgot password page. Please check the below video.
  4. http://srecorder.com/uploads/2019-03-21_07.44.28.mp4

If you got a solution, please Accept as Solution & Click Kudos.