Sunday, June 21, 2015

[PrestaShop][Language][EN] Deep into the translation of modules and system in PrestaShop (Final Episode) Part 2

[PrestaShop][Language][EN] Deep into the translation of modules and system in PrestaShop (Final Episode) Part 2

In the last episode of translations in prestashop, you will see the structure of theme as follows,

The structure of folder Lang from theme for instance, \themes\ap_office\lang. it is the last folder that I will explain.
Please look at below
global $_LANG; 
$_LANG = array(); 

$_LANG['404_d0fbda9855d118740f1105334305c126'] = 'Page not found'; 
$_LANG['404_44b1d05764b093cb00c25b8228cb87d3'] = 'This page is not available'; 
$_LANG['addresses_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'My account'; 
$_LANG['addresses_e45be0a0d4a0b62b15694c1a631e6e62'] = 'My addresses'; 

For the language in which is written by theme that It has a new variable, so you will see the name is $_LANG, and the name as a variable that controls all of messages to express on all screen that more details as below.
$_LANG['addresses_e45be0a0d4a0b62b15694c1a631e6e62'] = 'My addresses'; 
$_LANG means a variable
addresses_ means an action or a template file(*.tpl) that is expected a relations of expression on screen for this example you will see a relation of language and addresses.tpl that contains a command or sentence for instance,
{l s='My addresses'}  you will see the language tag is too small detail, moreover you may not write mod(ule) tag concatenates the language tag.

e45be0a0d4a0b62b15694c1a631e6e62 means MD5 of My addresses
'My addresses' means a message or string to express on screen

          The concluding of explaining translation language, you will see the prestashop that is designed for support multilingual or using multiple language website as well as comfortable.
even though, there are more parts of language I won’t explain but it has more important as good as template file that is a language of database, as if I have never explained on the other hand you can write and save many languages on the screen of prestashop system that the system provided a part of optional language too, furthermore, you will write more details and more languages If you want to express it.


Hopefully, All the articles that I wrote, It will explain you so that you will understand in mechanism of multilingual in prestashop as well as possible. If you have some question you can send a message for me. I glad to meet you all guys.


WindowsDNA wrote.


No comments: