edsmiths Posted January 15, 2014 Share Posted January 15, 2014 Hi there, I'm using a theme with this module "tmheaderlinks". I want to add a field/link to a CMS page, which I've managed to do easily. But now I've a problem trying to translate it to another language other than the default. Probably it's easier with the code: 1 - .tpl file <ul id="tmheaderlinks"> <li><a href="{$link->getPageLink('index')}"{if $page_name == 'index'} class="active"{/if}>{l s='home' mod='tmheaderlinks'}</a></li> <li><a href="{$link->getPageLink('prices-drop')}"{if $page_name == 'prices-drop'} class="active"{/if}>{l s='specials' mod='tmheaderlinks'}</a></li> <li><a href="{$link->getPageLink('cms?id_cms=1')}"{if isset($smarty.get.id_cms)}{if $smarty.get.id_cms == 1} class="active"{/if}{/if}>{l s='delivery' mod='tmheaderlinks'}</a></li> --> <!-- WANT TO AD ANOTHER LINK TO A CMS PAGE. EXAMPLE "OUR TEAM" --> <li><a href="{$link->getPageLink('cms?id_cms=11')}"{if isset($smarty.get.id_cms)}{if $smarty.get.id_cms == 11} class="active"{/if}{/if}>{l s='our team' mod='tmheaderlinks'}</a></li> <!-- PAGE ID IS 11 AND THE LINK WORK PROPERLY--> <li><a href="{$link->getPageLink('contact', true)}" {if $page_name == 'contact'} class="active"{/if}>{l s='contact' mod='tmheaderlinks'}</a></li> </ul> 2 - php file (translation folder) <?php global $_MODULE; $_MODULE = array(); $_MODULE['<{tmheaderlinks}prestashop>tmheaderlinks_3a3bf29ed9ddeb6210a731d2b1454df2'] = 'Añadir un bloque que muestre los enlaces permanentes como mapa del sitio, contacto, etc.'; $_MODULE['<{tmheaderlinks}prestashop>tmheaderlinks_106a6c241b8797f52e1e77317b96a201'] = 'inicio'; $_MODULE['<{tmheaderlinks}prestashop>tmheaderlinks_51d9a87ceb513de9363d548dc1bee90d'] = 'especiales'; $_MODULE['<{tmheaderlinks}prestashop>tmheaderlinks_7108537956afa2a526f96cc9da7b0c36'] = 'entrega'; /* TRANSLATION FIELD TO "OUR TEAM" IN SPANISH */ $_MODULE['<{tmheaderlinks}prestashop>tmheaderlinks_2f8a6bf31f3bd67bd2d9720c58b19c9a'] = 'contacto'; Prestashop 1.5.6.0 engine Would really appreciate your help Thanks in advance, Ed Link to comment Share on other sites More sharing options...
vekia Posted January 15, 2014 Share Posted January 15, 2014 hello why not to use localization > translations > installed modules translations (dropdown option) ? this is the proper way to generate translations, especially when you can't find it in translate file. Link to comment Share on other sites More sharing options...
edsmiths Posted January 15, 2014 Author Share Posted January 15, 2014 Thanks vekia, I didn't knew that after adding the field to the tpl file, it shows up in the translation options. Another lesson for today Thanks mate... you can mark the thread as solved. Link to comment Share on other sites More sharing options...
vekia Posted January 15, 2014 Share Posted January 15, 2014 you're welcome glad to hear that i could help you a little i marked topic as [solved] exactly as you suggested with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts