0

I want to find the location (or source) of the translation of the 'All [CATEGORY]' string in the submenu (All componenten in this situation):

enter image description here

3

Are you talking about a submenu in the main navigation? If so the string is defined in lib/web/mage/menu.js on line 286.

You can translate it by adding: "All ",Your translation ,lib,lib/web/mage/menu.js to your translation file.

  • It doesn't work, but shouldn't there be a variable involved in the translation? Like "All %s", "Alle %s","module","Magento_Catalog" – Maarten Wolfsen Jan 26 '17 at 10:31
  • No variable needed, if you look at the source .text($.mage.__('All ') + category); you'll see that the category is defined outside of the __() translation function. Are you adding the translation in a theme translation file or in a module translation pack? – oscarpas Jan 26 '17 at 10:35
  • I am adding the translation in a theme translation file located in app > design > frontend > vendor > store > i18n > nl_NL.csv. – Maarten Wolfsen Jan 26 '17 at 11:05
  • 1
    I see, I've got it working when using a language pack only. There are some bugs in M2 when translating strings defined in js, that might be the cause. See this issue: github.com/magento/magento2/issues/7525 – oscarpas Jan 26 '17 at 11: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.