mike10101 Posted July 28, 2017 Share Posted July 28, 2017 Hello. I added a new translation string in the ps_newproducts tpl inside the theme directory and it's not showing in back-office > International > Translations. I can't find the translation in any of the sections (theme, module ..). {l s='Translatable text here' d='Shop.Theme.Catalog'} Added this in themes/classic/modules/ps_newproducts/views/templates/hook/ps_newproducts.tpl. PS version: 1.7.1.1 Please help. Link to comment Share on other sites More sharing options...
Antoine F Posted July 28, 2017 Share Posted July 28, 2017 Hello Mike,I've talked with the Product team to get more information. First, they told me that this blog article should be really useful. They also suggest you get the 1.7.2.0 version which is way better for the translations. You use a domain in which its string doesn't exist, so it doesn't work. You need a personal domain in this case.Cheers,Antoine Link to comment Share on other sites More sharing options...
mike10101 Posted July 31, 2017 Author Share Posted July 31, 2017 (edited) I read that article already and I really don't understand what I'm doing wrong. I installed 1.7.2.0 locally and I still don't see the translation strings appear in the back-office!I added this {l s='Hello World' d='Shop.Theme.Catalog'} to themes/classic/templates/catalog/_partials/miniatures/product.tpl {block name='product_miniature_item'} <article class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product"> <div class="thumbnail-container"> {block name='product_thumbnail'} <a href="{$product.url}" class="thumbnail product-thumbnail"> <img src = "{$product.cover.bySize.home_default.url}" alt = "{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" data-full-size-image-url = "{$product.cover.large.url}" > </a> {/block} <div class="product-description"> {block name='product_name'} <p>{l s='Hello World' d='Shop.Theme.Catalog'}</p> <h1 class="h3 product-title" itemprop="name"><a href="{$product.url}">{$product.name|truncate:30:'...'}</a></h1> {/block} ... And it still doesn't work, I tried with <p>{l s='Hello World' d='Shop.Custom'}</p> and still nothing. Other than the original template and the cache files, the 'Hello World' text doesn't show up anywhere else. What am I doing wrong ? Is my server missing an extension or something? Edited July 31, 2017 by mike10101 (see edit history) Link to comment Share on other sites More sharing options...
Alex Even Posted July 31, 2017 Share Posted July 31, 2017 Hello Mike, As mentioned in the introduction of the article, the translation page will look for new content outside the Classic folder: These methods only work if you are working on a theme with a name that is not “classic”. If you’re tweaking the Classic theme and you’ve kept the “/classic” folder, your new strings won’t be detected. PrestaShop is only looking for new strings in theme folders other than “/classic”. If you're modifying Classic, the best is to create a child theme and rename it. Then if you follow what's in the article, you should be able to translate your new strings. To know more about parent/child theme, please read this documentation: http://developers.prestashop.com/themes/smarty/parent-child-feature.html? You can also see an example here: https://github.com/PrestaShop/childtheme-example Hope this will help 2 Link to comment Share on other sites More sharing options...
mike10101 Posted August 2, 2017 Author Share Posted August 2, 2017 I can't believe I missed that! It is an odd request but it did the trick ! Thank you for your help! Kudos. Link to comment Share on other sites More sharing options...
Alex Even Posted August 2, 2017 Share Posted August 2, 2017 Glad it solved your problem! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now