I am using a custom theme with Luma parent, and I am trying to change the text of the Sign In link (authorization-link-login) at the top. I am able to edit the text of the register link in my default.xml file successfully using

 <referenceBlock name="register-link">
        <arguments>
        <argument name="label" xsi:type="string" translate="true">Register</argument></arguments>
 </referenceBlock>

But if I try

 <referenceBlock name="authorization-link-login">
        <arguments>
        <argument name="label" xsi:type="string" translate="true">Custom Text</argument></arguments>
 </referenceBlock>

the link still reads "Sign In" and has no change. Is there another way to change the Sign In text?

有帮助吗?

解决方案

Consider just using the i18n translations, less complexity, easier maintainability.

app/design/frontend/vendor/theme/i18n/en_US.csv

"Sign In","Your Text"
许可以下: CC-BY-SA归因
scroll top