0

I recently installed Magento 2 Blog extension FREE and I want to adjust templates to suite my theme and add some translation strings.

I know that template overrides should be placed in:

app/design/frontend/ThemeVendor/themeName/ExtVendor_ExtName/templates

but I don't know what is proper path for this particular module. I tried alot of naming conventions - small and big letters, with and without hypens - but any of them works.

Now I have:

app/design/fontend/Gbitdev/theme-green/Mageplaza_Magento-2-blog-extension/templates/widget/posts.phtml

and after any change I just copy this file to:

vendor/mageplaza/magento-2-blog-extension/view/frontend/templates/widget/posts.phtml


Second problem are translations for third-party extensions: I cant find on web where they should be placed? Is proper way is place e.g. pl_PL.csv in

app/design/frontend/ThemeVendor/themeName/ExtVendor_ExtName/i18n

or I should just add translation strings to my template translations theme/i18n/pl_PL.csv. Second way is not working at now becouse (I think) I don't know 4th column (e.g. Magento_Search).

1 Answer 1

0

For Magento 2 modules you can always find the right module name in registration.php. So in the case of Mageplaza's module that would be Mageplaza_Blog.

So for your theme: app/design/fontend/Gbitdev/theme-green/Mageplaza_Blog/templates

As for the translations, you can place your csv file simply in app/design/frontend/{Vendorname}/{themename}/i18n/ (No module name in this path).

Which means it sounds like you're doing it right. Are you clearing your cache after each change?

3
  • Yes, Yes Yesi Mageplaza_Blog just works ;] And with translations - when I just started with magento but I find it's convenient to disable cache completely - on local machine it doesn't make much performance impact.I even tried bin/magento setup:static-content:deploy -f pl_PL.
    – gbitdev
    Commented Oct 11, 2018 at 10:45
  • Even when I added 3rd and 4th column (I have now "Posted on %1","Utworzony przez %1",module,Mageplaza_Blog) to follow convention from "Sign In","Logowanie",module,Magento_Customer it is not working anyway.
    – gbitdev
    Commented Oct 11, 2018 at 10:50
  • Apologies for the delay. But you only need 2 columns. For example: app/design/frontend/{Vendor}\{MyTheme}\i18n\pl_PL.csv -> "Posted on %1","Utworzony przez %1" should be enough. Clear cache after making changes. But do note that any strings translated in the translation database table take preference.
    – sduif
    Commented Oct 16, 2018 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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