liquidesnake Posted May 7, 2011 Share Posted May 7, 2011 Hi all,I created a new module but i am stuck with the language section. How do you create your own words or translation. I don't want to create a new language Pack.is there anyone who could explain me the following (How does it works):for instance, i ve got this file in fr.php with $_MODULE['<{blockcms}prestashop>blockcms_cd275312651aebf8cbbb8d3bb1c086ae'] = 'Bloc CMS';I understood that the "$_MODULE['<{blockcms}prestashop>blockcms_" points to the 'blockcms' module, but where the 'cd275312651aebf8cbbb8d3bb1c086ae' is it coming from? i think that number is unique and related to: 'Bloc CMS'but How do you generate that number? Link to comment Share on other sites More sharing options...
jeevanoss Posted May 7, 2011 Share Posted May 7, 2011 You can do the translation in Back Office >>Tools>> Translations, select Module translation & click fr lang flag.Then go to your module to be translated.After translation & press update button in bottom.On update press, will write to fr.php in the module directory Link to comment Share on other sites More sharing options...
liquidesnake Posted May 10, 2011 Author Share Posted May 10, 2011 Thank you jeevanoss. i now understood the process. but How do I create my own lines or add a new translation? should i just create a random number form " $_MODULE[’<{blockcms}prestashop>blockcms_cd275312651aebf8cbbb8d3bb1c086ae’] " and then the system will added it up automatically? Link to comment Share on other sites More sharing options...
rocky Posted May 11, 2011 Share Posted May 11, 2011 Use the following in PHP files: $this->l('Your text') and the following in TPL files: {l s='Your text' mod='yourmodulename'} You can then go to Tools > Translations > Module translations, then the new strings should appear in your module's section. You can then enter translations for the string. You shouldn't manually edit the language files, since that is error-prone. Link to comment Share on other sites More sharing options...
[email protected] Posted May 12, 2011 Share Posted May 12, 2011 well thanks you all the users by providing the nice information regarding to the language tools because i was also never know that how to use these language packs through this forum and i also want to apply it on my own website which i have made and i hope now i will be successes in this way thanks for sharing the post with us Link to comment Share on other sites More sharing options...
Asenar Posted May 13, 2011 Share Posted May 13, 2011 Hi,if you want to know how that number is translated, it's based on the md5 sum of the english [removed]which is in the tpl or/and php files, when you use what rocky said. be careful, problem may happen if you use double-quotes instead of simple quotes Link to comment Share on other sites More sharing options...
liquidesnake Posted May 13, 2011 Author Share Posted May 13, 2011 Thank You to Rocky And Michael. it's now very clear! i am glad that I wasnt the only one lost there >>sidramalik100 I will give it a try asa I get a chance.Thanks again guys Link to comment Share on other sites More sharing options...
umamishop Posted July 10, 2011 Share Posted July 10, 2011 Hi Rocky,I tried your suggestion for a customized php file and it didn't work. Is there another way?Thanks! Link to comment Share on other sites More sharing options...
Asenar Posted July 11, 2011 Share Posted July 11, 2011 unamishop, does your customized php files is a class which extends Module ? If not, the problem came from that. Link to comment Share on other sites More sharing options...
umamishop Posted July 11, 2011 Share Posted July 11, 2011 Hi Michael,Thanks for your post. No, I don't think it's in a class which extends the module. How do I do that? Link to comment Share on other sites More sharing options...
mux Posted July 6, 2012 Share Posted July 6, 2012 Use the following in PHP files: $this->l('Your text') and the following in TPL files: {l s='Your text' mod='yourmodulename'} You can then go to Tools > Translations > Module translations, then the new strings should appear in your module's section. You can then enter translations for the string. You shouldn't manually edit the language files, since that is error-prone. Hi Rocky!!! Your solution looks great but i can't totally understand where to update php files?? I have made custom footer in my site and used English names of them. But they are not translated by other languages. Please elaborates the steps Thanks in advance Link to comment Share on other sites More sharing options...
fong hong Posted December 24, 2014 Share Posted December 24, 2014 md5sum generator link http://www.miraclesa...ebtools/md5.php pls visit this link more at 7zhop.com 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