Forums / Addon Language Packs / Memo for translators

Memo for translators

Views: 3,351

Results 1 to 7 of 7
22 Oct 2024, 5:11 AM
#1
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Memo for translators

This is not a plugin, but more a bunch of information that will save a lot of time to translators.

With new ZC v2.1.0 nearly all system should be able to switch language smoothly, which was not the case until now with admin menus and plugins, modules...

Now that is possible, for language pack maker, finding strings to translate might be a challenge. Here is a list of places where you will find them.

Language files:
admin/includes/languages/english/
includes/languages/english/
zc_install/includes/languages/english/
zc_plugins/DisplayLogs/vx.x.x/admin/includes/languages/english/
zc_plugins/POSM/vx.x.x/admin/includes/languages/english/
zc_plugins/POSM/vx.x.x/catalog/includes/languages/english/
zc_plugins/POSM/vx.x.x/installer/languages/english/
zc_plugins/SystemInspection/x.x.x/admin/includes/languages/english/
zc_plugins/SystemInspection/x.x.x/installer/languages/english/

Images buttons (You need an image editor too to create new buttons):
includes/templates/template_default/buttons/english

Hard coded strings (this part is only used one time before installation):
includes/templates/template_default/templates/tpl_zc_install_suggested_default.php
includes/templates/template_default/templates/tpl_zc_phpupgrade_default.php

Database configuration menus:
These are all the admin menus and submenus. You can find them in files before intallation or on an installed cart they are in database, at least for parts that have been installed.

IN FILES:
zc_install/sql/install/mysql_zencart.sql
On all lines starting by:
'INSERT INTO configuration' or 'INSERT IGNORE INTO configuration', look for values of fields 'configuration_title' and 'configuration_description'.
'INSERT INTO configuration_group', look for values of fields 'configuration_title' (second one) and 'configuration_description' (third one).
'INSERT INTO product_types', look for values of second field 'type_name'.
'INSERT INTO product_type_layout', look for values of fields 'configuration_title' and 'configuration_description'.

zc_plugins/DisplayLogs/vx.x.x/installer/ScriptedInstaller.php
Look for 'configuration_title' and 'configuration_description' definitions.

zc_plugins/POSM/vx.x.x/admin/installer/ScriptedInstaller.php
After '"INSERT IGNORE INTO " . TABLE_CONFIGURATION . " ... VALUES', look fo first and fourth field of each values lines.

Plugin names and description:
zc_plugins/PLUGIN_NAME/PLUGIN_VERSION/manifest.php
Look for 'pluginName' and 'pluginDescription' definitions.

For modules shipping, payment and order total:
includes/modules/(shipping, payment or order_total)/MODULE_NAME.php
Look for 'function install()' which contains SQL queries with 'configuration_title' and 'configuration_description'.

IN DATABASE:
Modules or plugins not installed won't have their English strings registered in database!!!

Table 'configuration', fields 'configuration_title' and 'configuration_description'.
Table 'configuration_group', fields 'configuration_title' and 'configuration_description' (not really used).
Table 'product_types', field 'type_name'.
Table 'product_type_layout', fields 'configuration_title' and 'configuration_description'.
Table 'plugin_control', fields 'name' and 'description'.

Database fields to be translated through admin interface:
Table 'categories_description', fields 'categories_name' and 'categories_description'.
Menu : Catalog::Categories/Products -> Click on 'Edit' icon for a category.
Table 'meta_tags_categories_description', fields 'meta_tags_title', 'meta_tags_keywords' and 'meta_tags_description'.
Menu : Catalog::Categories/Products -> Click on 'Edit Meta Tags' icon for a category.

Table 'coupons_description', fields 'coupon_name' and 'coupon_description'.
Menu : Discounts::Coupon Admin -> Select a coupon and click on 'Edit' button.

Table 'ezpages_content', fields 'pages_title' and 'pages_html_text'.
Menu : Tools::EZ-Pages -> Select a page and click on 'Edit' button.

Table 'products_description', fields 'products_name' and 'products_description'.
Menu : Catalog::Categories/Products -> Click on category until product listing displays -> Click on 'Edit Product' icon for a product.
Table 'meta_tags_products_description', fields 'meta_tags_title', 'meta_tags_keywords' and 'meta_tags_description'.
Menu : Catalog::Categories/Products -> Click on category until product listing displays -> Click on 'Edit Meta Tags' icon for a product.

Table 'products_options', fields 'products_options_name' and 'products_options_comment'.
Menu : Catalog::Option Name Manager -> Click on 'Edit' button for an option.

Table 'orders_status', field 'orders_status_name'.
Menu : Localization::Orders Status -> Select a status and click on 'Edit' button.

Looking at this list, you can imagine how much work it is to make a full language pack...:blink:
When all these strings have been translated you need to put them at the right place too, but this will be for another post.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

22 Oct 2024, 8:54 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Memo for translators

@pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

https://docs.zen-cart.com/dev/languages/creating_a_language_pack/

or maybe a new page in that folder?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

22 Oct 2024, 10:26 AM
#3
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Re: Memo for translators

swguy:

@pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

https://docs.zen-cart.com/dev/languages/creating_a_language_pack/

or maybe a new page in that folder?

No problem, I will just need time to learn how to do it. Plus this post is half of what I am preparing. Next part is how to semi automaticaly extract these strings and format them to fit in language files, making it easier to translate.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

22 Oct 2024, 10:28 AM
#4
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Re: Memo for translators

Forgot this one in the list of database fields to be translated through admin interface:

If POSM has been installed:
Table 'products_options_stock_names' field 'pos_name'.
Menu : Catalog::Manage Options' Stock -> Click on 'Define Labels' button -> Select a label and click on 'Edit' button.

It is pretty hard to find it...

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

23 Oct 2024, 10:13 AM
#5
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Re: Memo for translators

swguy:

@pilou2 Would you like to create a PR for the doc repo with this information? Perhaps to

https://docs.zen-cart.com/dev/languages/creating_a_language_pack/

or maybe a new page in that folder?

@swguy
I have just submited a new page on GitHub dev documentation. Please have a look and feel free to correct or modify it. Links to this page from other pages/menus will need to added .

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

19 Nov 2024, 6:02 PM
#6
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Re: Memo for translators

I forgot to add the link to the new documentation page:
https://docs.zen-cart.com/dev/languages/what_to_translate/

Even with these information, it is still complicated to extract English strings from database/files, especially for translators who are not much into coding. To prepare the work for them, I did the extraction of English strings and conversion to ZC language files for all admin menus and other database saved texts in ZC and few plugins.
Using these files, a translator 'just' have to rename all english folders to the new language and then translate all files contents, which is still a lot of work.
At the end, adding this translation to standard ZC languages files translation will result in a near 100% translation of ZC.

I am not sure yet where to put these files. For now they are on my GitHub repo:
https://github.com/piloujp/Zen-Cart-English-Strings-for-Translation/tree/main

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

27 Mar 2026, 4:47 PM
#7
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
413
Plugin Contributions:
6

Re: Memo for translators

The GitHub repo with the database language strings already extracted to files has been updated for ZC v2.2.1.
If you want to translate admin menus and other modules options, you will find languages file already formated to be used by ZC. You just need to replace these English strings by their translation an rename English folders to the new language. Then you can combine these with a ZC files only translation to have a full Language Pack.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+