Kiyro Posted October 10, 2013 Share Posted October 10, 2013 Hello, I need your help.Initially I created a theme for my prestashop, only in Italian language, adding div and phrases to the tpl files.Now I added the multi-language and I was wondering how to dynamically change the wording in the tpl files depending on the language selected.Thank you very much in advance. Link to comment Share on other sites More sharing options...
vekia Posted October 10, 2013 Share Posted October 10, 2013 you can change translations under localization > translations tab in your back office. more information about this awesome feature you can read here: http://doc.prestashop.com/display/PS15/Understanding+Local+Settings#UnderstandingLocalSettings-Translations Link to comment Share on other sites More sharing options...
Kiyro Posted October 11, 2013 Author Share Posted October 11, 2013 How can I add new "field" for a new "static text" (which i added in template) in translation page? Link to comment Share on other sites More sharing options...
NemoPS Posted October 11, 2013 Share Posted October 11, 2013 It depends on where you add it. for modules: {l s='this is the text' mod='modulename'} For pages {l s='this is the text'} This for tpl files For php you can use $this->l('string to be translated'); Link to comment Share on other sites More sharing options...
Kiyro Posted October 11, 2013 Author Share Posted October 11, 2013 Grazie! Thank you! If i want to change a image in a slider depending on the selected language, how could I do? Link to comment Share on other sites More sharing options...
NemoPS Posted October 11, 2013 Share Posted October 11, 2013 Oh, that's a lot more complex, it depends on whether the slider supports it or not, it's hard to explain in a single forum post Link to comment Share on other sites More sharing options...
vekia Posted October 11, 2013 Share Posted October 11, 2013 what module you use? default imageslider for homepage? if so, you can do it in module configuration page without changing files Link to comment Share on other sites More sharing options...
Kiyro Posted October 11, 2013 Author Share Posted October 11, 2013 I don't use a module, I use a simple javascript slider open source. Its a static slider in a index.tpl <div> <div class=""> <a href="link of a page"><img src="../img/IMG.ITA.png" class="img1-slide2" /></a> </div> </div> Link to comment Share on other sites More sharing options...
NemoPS Posted October 11, 2013 Share Posted October 11, 2013 I suggest you use language IDS then, like <div> <div class=""> <a href="link of a page"><img src="../img/IMG_{$lang_iso}.png" class="img1-slide2" /></a> </div> </div> Link to comment Share on other sites More sharing options...
Kiyro Posted October 11, 2013 Author Share Posted October 11, 2013 Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts