[PrestaShop][Language][EN] Deep into the
translation of modules and system in PrestaShop (Final Episode) Part 1
Folder
both Translations and Lang that there are more different structure, Today, I
will explain all of structures to you so that you would try to use its
correction and automation if you use with Prestashop Automatic Translations
with google.
The structure of translations from system for instance, \translations\en\admin.php
global $_LANGADM;
$_LANGADM = array();
$_LANGADM['AdminAddressesd3b206d196cd6be3a2764c1fb90b200f'] = 'Delete selected';
$_LANGADM['AdminAddressese25f0ecd41211b01c83e5fec41df4fe7'] = 'Delete selected items?';
$_LANGADM['AdminAddressesb718adec73e04ce3ec720dd11a06a308'] = 'ID';
$_LANGADM = array();
$_LANGADM['AdminAddressesd3b206d196cd6be3a2764c1fb90b200f'] = 'Delete selected';
$_LANGADM['AdminAddressese25f0ecd41211b01c83e5fec41df4fe7'] = 'Delete selected items?';
$_LANGADM['AdminAddressesb718adec73e04ce3ec720dd11a06a308'] = 'ID';
If variables as a part of admin section or it’s an
expression a message from backend zone that it will use variable name is
$_LANGADM
$_LANGADM['AdminAddressesd3b206d196cd6be3a2764c1fb90b200f'] = 'Delete selected';
$_LANGADM means a name of variable
AdminAddresses means
module’s name which express with each part
d3b206d196cd6be3a2764c1fb90b200f means MD5 of a message’s name is ‘Delete
selected’
'Delete selected' means
a message that you want to express on the screen
Although, It has many variables for admin section as
if $_ERRORS, $_FIELDS, $_LANGPDF except $_TABS, so It contains a key without
encrypt with MD5
the structure of translations from
module for instance, fbconnect_psb\translations
global $_MODULE;
$_MODULE = array();
$_MODULE['<{fbconnect_psb}prestashop>registration_fb_6335a00a08fde0fbb8f6d6630cdadd92'] = 'ข้อมูลส่วนบุคคล';
$_MODULE['<{fbconnect_psb}prestashop>registration_fb_b78a3223503896721cca1303f776159b'] = 'คำนำหน้า';
$_MODULE = array();
$_MODULE['<{fbconnect_psb}prestashop>registration_fb_6335a00a08fde0fbb8f6d6630cdadd92'] = 'ข้อมูลส่วนบุคคล';
$_MODULE['<{fbconnect_psb}prestashop>registration_fb_b78a3223503896721cca1303f776159b'] = 'คำนำหน้า';
You will see the structure that It has a different
variable which the prestashop system use a name of variable called $_MODULE as
follows,
$_MODULE['<{fbconnect_psb}prestashop>registration_fb_6335a00a08fde0fbb8f6d6630cdadd92'] = 'ข้อมูลส่วนบุคคล';
$_MODULE means a
name’s variable for get value of language
<{fbconnect_psb}prestashop>registration_fb_ means the key that is a part of
language’s express and there are covered 3 attributes such as,
· {fbconnect_psb} means a module name
· <prestashop>
means a Tag of prestashop
· registration_fb means an action or a part of template file (*.tpl)
When 3 attributes compound, the language file will
support module that have a several template files with only one file.
PS1: Even though, it contains the same word, but it
is different template file. You must write a new key of template file.
PS2: For example a template file, you will see a
statement as bellow,
{l s='Your personal information'
mod='fbconnect_psb'}
It means a l(anguage) that contains s(tring) name
is ‘Your personal information’ in a part of mod(ule) name is fbconnect_psb that
It relates with en.php or th.php from the explanation above.
6335a00a08fde0fbb8f6d6630cdadd92 means MD5 of a message name is “ข้อมูลส่วนบุคคล”
'ข้อมูลส่วนบุคคล'
means a message you want to express on the screen
to be continued...
http://windowsdna.blogspot.com/2015/06/prestashoplanguageen-deep-into_21.html
http://windowsdna.blogspot.com/2015/06/prestashoplanguageen-deep-into_21.html
No comments:
Post a Comment