starbolt Posted December 10, 2012 Share Posted December 10, 2012 (edited) Hello, I'm having some trouble to translate the months names on Prestashop 1.4.8. The following code has the months but when i change them to my language, they are not changed in Prestashop. Im not using any cache so I'm pretty sure that it's not working. Any clues? The following code is taken from identity.tpl in my themes folder. Everything is translated, except the month names in the select. <p class="select"> <label>{l s='Data de Nascimento'}</label> <select name="days" id="days"> <option value="">-</option> {foreach from=$days item=v} <option value="{$v|escape:'htmlall':'UTF-8'}" {if ($sl_day == $v)}selected="selected"{/if}>{$v|escape:'htmlall':'UTF-8'} </option> {/foreach} </select> {* {l s='Janeiro'} {l s='Fevereiro'} {l s='Março'} {l s='Abril'} {l s='Maio'} {l s='Junho'} {l s='Julho'} {l s='Agosto'} {l s='Setembro'} {l s='Outubro'} {l s='Novembro'} {l s='Dezembro'} *} <select id="months" name="months"> <option value="">-</option> {foreach from=$months key=k item=v} <option value="{$k|escape:'htmlall':'UTF-8'}" {if ($sl_month == $k)}selected="selected"{/if}>{l s="$v"} </option> {/foreach} </select> <select id="years" name="years"> <option value="">-</option> {foreach from=$years item=v} <option value="{$v|escape:'htmlall':'UTF-8'}" {if ($sl_year == $v)}selected="selected"{/if}>{$v|escape:'htmlall':'UTF-8'} </option> {/foreach} </select> </p> Edited December 10, 2012 by starbolt (see edit history) Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted December 10, 2012 Share Posted December 10, 2012 that is not a good way to go about it... it's simple to translate using the back office back office-->tools-->translations select front office translations select the flag of the languge you want to translate expand all fields find the text you want to translate, translate it, scroll to the bottom and click save... You will be updating authentification suerte Link to comment Share on other sites More sharing options...
starbolt Posted December 10, 2012 Author Share Posted December 10, 2012 Thanks for the quick reply. The month names are correctly translated on the back office. I don't know what is missing Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted December 10, 2012 Share Posted December 10, 2012 Thanks for the quick reply. The month names are correctly translated on the back office. I don't know what is missing well you broke what can only be broken by changing files... set smarty force compile to yes.... Link to comment Share on other sites More sharing options...
starbolt Posted December 11, 2012 Author Share Posted December 11, 2012 well you broke what can only be broken by changing files... set smarty force compile to yes.... It's already set! I can get the original file with all the months in English and it will not work too. Link to comment Share on other sites More sharing options...
starbolt Posted December 12, 2012 Author Share Posted December 12, 2012 Anyone? Link to comment Share on other sites More sharing options...
tiga Posted July 30, 2014 Share Posted July 30, 2014 (edited) Anyone knows how to fix this? I am at presta 1.6 and same problem. I've translated in backoffice the months and they always appear in english no matter what. just found this only happens when edditing an old account, when creating a new one, there's no problem. Edited July 30, 2014 by tiga (see edit history) 1 Link to comment Share on other sites More sharing options...
DannetStudio Posted August 4, 2014 Share Posted August 4, 2014 I had the same problem in PS 1.6, months in english in the create account form and identity sections.I've fixed it adding the next code before the months foreach in authentication.tpl and identity.tpl: {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} After that load the forms in the website, and it will generate the translation string, you can go to the admin > translations > front-office translations and the new list of months will be available for translation. 2 Link to comment Share on other sites More sharing options...
Alejandrosi Posted October 29, 2014 Share Posted October 29, 2014 DannetStudio solution works. Thanks! <div class="col-xs-4"> <select id="months" name="months" class="form-control"> <option value="">-</option> {foreach from=$months key=k item=v} <option value="{$k}" {if ($sl_month == $k)}selected="selected"{/if}>{l s=$v} </option> {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} {/foreach} </select> </div> Link to comment Share on other sites More sharing options...
Euqara Posted November 13, 2014 Share Posted November 13, 2014 (edited) Hi, I have same problem. I've just modified file just like you, but when I save and try to load web page doesn't display anything... I am modifying identity.tpl. Is this the file? Thank you so much! Edited November 14, 2014 by Euqara (see edit history) Link to comment Share on other sites More sharing options...
Alejandrosi Posted November 13, 2014 Share Posted November 13, 2014 No soy un experto en esto pero creo que si la página te queda en blanco es porque hay algún código mal abierto o cerrado. Trata de que el primer <div> y el </div> final queden en la misma linea (vertical). Lo mismo con el <select id>. Si no te funciona avisa y lo vemos. Suerte <div class="col-xs-4"> <select id="months" name="months" class="form-control"> <option value="">-</option> {foreach from=$months key=k item=v} <option value="{$k}" {if ($sl_month == $k)}selected="selected"{/if}>{l s=$v} </option> {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} {/foreach} </select> </div> Link to comment Share on other sites More sharing options...
Euqara Posted November 14, 2014 Share Posted November 14, 2014 (edited) Alejandrosi, it worked in secon try.... I do not really know why.... Just did the same jejejejje Thank you so much, you guys work very well Best regards! Edited November 14, 2014 by Euqara (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 14, 2014 Share Posted November 14, 2014 we are in english section please use english language here thanks in advance, milos Link to comment Share on other sites More sharing options...
Euqara Posted November 14, 2014 Share Posted November 14, 2014 Oh... So sorry vekia, I haven't realized. I will try to translate previous post as well as I can Link to comment Share on other sites More sharing options...
Hirosaki Posted April 8, 2016 Share Posted April 8, 2016 I had the same problem in PS 1.6, months in english in the create account form and identity sections. I've fixed it adding the next code before the months foreach in authentication.tpl and identity.tpl: {l s='January'} {l s='February'} {l s='March'} {l s='April'} {l s='May'} {l s='June'} {l s='July'} {l s='August'} {l s='September'} {l s='October'} {l s='November'} {l s='December'} After that load the forms in the website, and it will generate the translation string, you can go to the admin > translations > front-office translations and the new list of months will be available for translation. Thanks a lot !!! After 3 hours searching, it worked for me!! I already tried to copy the months list in the identity.tpl file but it didn't work. It just needed to be reloaded in the Translation page on the BO and enter again the translation. Thank you soooo much !!! 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