Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5537

How to make Your Module Compatible for “All Languages”

$
0
0

To change Your Prestashop Language You have to select it at the time of installation.

1. Use  $this->l(‘’)  for the element you want to change in other languages in .php files.

Example: Suppose we want to display “welcome” in other languages.

so we have to use $this->l(‘welcome’)

2.  Use {l s=” mod=’module_name’}  for the element you want to change in other languages in .tpl or smarty  files.

Example: Suppose we want to display “welcome” in other languages.

so we have to use {l s=’welcome’ mod=’module_name’}

3. Create a folder in your module named ‘Translations’.

4. Create .php file/files in the Translations folder named under language iso_codes.For iso_code go to ps_lang table in the database.Files in the Translations folder should be empty.

Example: de.php, fr.php.

5.Now you have to make entries of all the word that you have entered in $this->ll(‘’) and  {l s=” mod=’module_name’}.

6. Go to prestashop back office ,Localisation Tab ->Translation Tab.

7. You have to select from  “Modify Translation”, for module select ‘Installed Module Translation’ and the language flag in which you want to change as shown in image below

lang2

 

8. Now go to your module and fill all the values as shown in the image below.

lang

after all changes save it.

Note – There must be Translation Folder and the file in your module to save the changes.

Facebook Twitter Email Reddit Stumbleupon

Viewing all articles
Browse latest Browse all 5537

Trending Articles