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:
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.
If you got a solution, please Accept as Solution & Click Kudos.