2

Simple question, how to translate string "settings" on mobile menu?

enter image description here

  • Have you added a translated string in csv file? – Chirag Patel Jun 14 at 5:41
1

Add below code in your csv file (I have add translated text for italian)

"Settings","impostazioni"

Copy file from below path

vendor/magento/module-theme/view/frontend/templates/html/sections.phtml

And past into your theme directory.

app/design/frontend/Themefolder/themename/Magento_Theme/templates/html/sections.phtml

And change code from <?= /* @escapeNotVerified */ $label ?> To <?php /* @escapeNotVerified */ echo __($label); ?>

If you want to translate string in .html file then you have to use <?php echo __('your string'); ?>

Fore more refrance check this

I hope it helps!

  • Worked just this --> "Settings","impostazioni" thank you – Silver Jun 14 at 7:04
  • You are welcome :) – Chirag Patel Jun 14 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.