Jump to content

Translate module related strings (Front and Back office)


guy_lux

Recommended Posts

Hi all,

I'm now able to build my own module, but I can't figure out about how to link translations to this module. I've got "en.php" and "fr.php" files inside my module dir, but when I look into them, it looks like this :

<?php

global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockcategories}prestashop>blockcategories_8f0ed7c57fca428f7e3f8e64d2f00918'] = 'Bloc catégories';
$_MODULE['<{blockcategories}prestashop>blockcategories_bdfd1b1bece2a3a5a52afa810a643a0d'] = 'Ajoute un bloc proposant une navigation au sein de vos catégories de produits';
$_MODULE['<{blockcategories}prestashop>blockcategories_23e0d4ecc25de9b2777fdaca3e2f3193'] = 'Profondeur maximum : nombre invalide';
$_MODULE['<{blockcategories}prestashop>blockcategories_0cf328636f0d607ac24a5c435866b94b'] = 'Dynamic HTML : choix invalide';



Four questions :

#What the hell is that token '8f0ed7c57fca428f7e3f8e64d2f00918'

#Where and how can I simply tell smarty "my_string" : "Ma chaine" ?

#Is it normal (and why ?) that the PHP end tag is missing in all language files ?

#Are both back and front strings into the same dictionnary file ?


Thank you very much for your help, 'must say I'm really lost with these translations files...

Link to comment
Share on other sites

You need to create an empty en.php file (see format of other modules).
If you want to include other translation with your moodule, create them from the Backoffice, prestashop will generate the lang.php file for, which you can include in the module.

The long token is basically the English string after an md5() php function was applied to it (I assume for uniqueness).

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
You need to create an empty en.php file (see format of other modules).
If you want to include other translation with your moodule, create them from the Backoffice, prestashop will generate the lang.php file for, which you can include in the module.

The long token is basically the English string after an md5() php function was applied to it (I assume for uniqueness).



thanks for you rely tomerg3,I have the same question as guy_lux

#Where and how can I simply tell smarty “my_string” : “Ma chaine” ?


you said we can create them from the backoffice,but in the tab tools-translations there are only for choices(Modify translations,Import a language pack,Export a language,Copy),there is no creation of new strings,please helps ,thank you
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...