USING MAGENTO TRANSLATION TOOLS



Similar documents
HOW TO CREATE THEME IN MAGENTO 2

IMPORT/EXPORT CUSTOMER REVIEWS. User Guide. User Guide Page 1

Bubble Code Review for Magento

Top Navigation menu - Tabs. User Guide 1. &

J2T Points & Rewards Magento Extension

Sterling Web. Localization Guide. Release 9.0. March 2010

Xerox Standard Accounting Import/Export User Information Customer Tip

Smooks Dev Tools Reference Guide. Version: GA

What's New in ADP Reporting?

ultimo theme Update Guide Copyright Infortis All rights reserved

Shop Manager Manual ConfigBox 3.0 for Magento

skype ID: store.belvg US phone number:

GPMD CheckoutSuite for Magento Documentation

How To Use Optimum Control EDI Import. EDI Invoice Import. EDI Supplier Setup General Set up

Getting Started with Automizy

Official Amazon Checkout Extension for Magento Commerce. Documentation

Magento Quotation Module User and Installer Documentation Version 2.2

DPD shipping module documentation. Magento module version 2.0.3

Guide PHPro Exclude Category From Minimum Amount Module

ProxiBlue Dynamic Category Products

LICENTIA. Nuntius. Magento Marketing Extension REVISION: THURSDAY, JUNE 2, 2016 (V )

Joomla! Override Plugin

ekomimeetsmage Manual for version 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0

SMSNotify Extension. User Documentation. Automated SMS sender and customer relationship tool. SMSNotify User Documentation 1

CUSTOM GOOGLE SEARCH PRO. User Guide. User Guide Page 1

Exporting Contact Information

Plugin Integration Guide

IMPORT / EXPORT PRODUCTS

Tips on exporting your Oracle Apps reports to Excel. Introduction

Creating Value through Innovation MAGENTO 1.X TO MAGENTO 2.0 MIGRATION

Microsoft SharePoint Products & Technologies

ultimo theme Update Guide Copyright Infortis All rights reserved

DEMO ONLY VERSION. Easy CramBible Lab M Magento Front End Developer Certification Exam. ** Single-user License **

Bitrix Site Manager 4.1. User Guide

IMPORT/EXPORT COUPON/SHOPPING CART RULES. User Guide. User Guide Page 1

Magento Extension Point of Sales User Manual Version 1.0

Microsoft SharePoint Products & Technologies

Hitachi PaybyFinance Magento Plugin

System Administrator Training Guide. Reliance Communications, Inc. 603 Mission Street Santa Cruz, CA

FORTIS. User Guide. Fully responsive flexible Magento theme by Infortis. Copyright Infortis. All rights reserved

Presentation Reporting Quick Start

Beyond EDI - How to import data into any JD Edwards table directly from an Excel spreadsheet without creating a custom program Session ID 36350

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

Multivendor Extension User Guide

CheckItOut Developer Manual

INTERSPIRE MARKETER

JOINUS AG. PowerPay Checkout. Magento Module User Manual. Support:

User Manual - Sales Lead Tracking Software

Magento Search Extension TECHNICAL DOCUMENTATION

MAGENTO Migration Tools

XTM Drupal Connector. A Translation Management Tool Plugin

opencrx Language Localization Guide

User s manual. Magento extension. BCP - Better Configurable Products

Designing for Magento

Infoview XIR3. User Guide. 1 of 20

Exporting Client Information

DutyCalculator - Installation and Configuration

Table of Contents. The RCS MINI HOWTO

MAGENTO TRAINING PROGRAM

Magento Enterprise Edition. User Guide. Part V: Store Operations System Operations. Version

Integrating VoltDB with Hadoop

Deploying the BIG-IP System v10 with Oracle Application Server 10g R2

Crystal Reports Integration Plugin for JIRA

Introduction to Directory Services

FreeForm Designer. Phone: Fax: POB 8792, Natanya, Israel Document2

Manage Website Template That Using Content Management System Joomla

Testking.M Q

Shop by Manufacturer Custom Module for Magento

AWS Service Catalog. User Guide

Creating Codes with Spreadsheet Upload

Bazaarvoice for Magento Extension Implementation Guide v6.3.4

Data Tool Platform SQL Development Tools

CARSTORE RESPONSIVE MAGENTO THEME

NØGSG DMR Contact Manager

PHP Integration Kit. Version User Guide

Module Private Sales User Manual

Magento module Documentation

Installation Manual for Catalog Infinite Scroll extension

Interspire Website Publisher Developer Documentation. Template Customization Guide

INSTALLATION GUIDE MC

Important Notice. All company and brand products and service names are trademarks or registered trademarks of their respective holders.

Table of Content. 1. Mofluid Installation. 2. Mofluid Uninstallation. a. Magento Connect b. Manual Installation

Mastering Magento Theme Design

Puppet Firewall Module and Landb Integration

OSF INTEGRATOR for INGRAM MICRO Integration Guide

USER GUIDE Slink for Magento

Avaya Network Configuration Manager User Guide

Page Editor Recommended Practices for Developers

Clever SFTP Instructions

SonicWALL GMS Custom Reports

Community Builder Language Package Guide Updated for CB 1.2.3

InstantSearch+ for Magento Extension

Elgg 1.8 Social Networking

Human Translation Server

How to Find High Authority Expired Domains Using Scrapebox

SiteBuilder E-Shop User Guide

Transcription:

Magento Translation Tools 1 USING MAGENTO TRANSLATION TOOLS Magento translation tools make the implementation of multi-language Magento stores significantly easier. They allow you to fetch all translatable strings from Magento and your customized templates, create CSV files from them, and the biggest time saver to translate the files automatically using one of the available community translations. They also make it easier to find which strings require translation due to the fact that they did not exist in the base translation. It is even possible to use translations from other Magento versions as a base if a translation matching your project version is not available. Installation Unpack the archive into the tools directory in the root Magento directory. This directory should not be part of the live site. Make sure to install it only on the development site and do not propagate to the live site. Use case 1: Generating files for translation based on existing community translations Configuration Before the tools can be used, it is required to prepare a configuration file (config.inc.php) that lists all directories which contain translatable files, assign files to specific translation modules, and provide mapping between helper names and module names. Mapping between helper names is required to put strings extracted from calls like: Mage::helper('catalogrule')-> ("Name: %s", $this->getname()) To the Mage_CatalogRule module (and as a result in the Mage_CatalogRule.csv translation file) The default configuration includes all Magento modules and default templates. To translate your project, you need to add specifications for all your custom modules that include any translatable strings, and all your custom templates.

Magento Translation Tools 2 There is also a section referring to the 'translate' module. All template files that are not related to any specific module should be assigned there. Usage The translation process consists of the following steps: 1) Extract all translatable strings from the Magento code into one file A 2) Combine community translations/previous translations from many CSV files into another file B 3) Go through the A file translating all matching strings using the B file as the reference 4) Split the partially translated file into many CSV files that Magento can use 5) If the files were not fully translated, they should be translated now (can be done before or after splitting) Each of the steps is automated using the provided tools. Next we will explain each step and provide instructions on using the tools. 1) Extract translatable strings When your configuration file is ready, it's time to extract translatable strings from PHP code into CSV files. php -f generate.php -- --output all.csv This will create file all.csv containing all extracted strings, the modules to which they belong, the files from which they were extracted, etc. As the file is created in the Magento root directory, move it to the tools/translate directory. 2) Combine community translations The first step is to install community translations for required languages using Magento Connect. The installed files will be put in directories like app/locale/fr_fr and other similar directiories. When this is ready, it's time to put all translations for the given language into one big file. We will use the French locale as an example.

Magento Translation Tools 3 php -f combine.php -- --output fr_fr_org.csv --locale fr_fr This will create the file fr_fr_org.csv using files from the app/locale/fr_fr directory. 3) Merge translations The next step is to use the available translations from the previous step to pre-translate your Magento project. php -f Merge.php -- --of all.csv --tf fr_fr_org.csv --mf fr_fr.csv --diff where fr_fr_org.csv is the file created in step 2 and fr_fr.csv is the merged result. The diff option is optional and means the resulting file will have another column with the value true when the string was translated or false if the string was not translated (or is the same as the original). This offers a great help to translators as they can concentrate fully on entries that show false. After merging, the tool shows statistics regarding how much information it was able to reuse. 4) Split translations The final step involving translation tools is to split the pre-translated file created in step 3 into a set of files readable by Magento. Before this can be done, clear the language directories app/locale/ from the CSV files. When this is complete, run: php -f split.php -- --input fr_fr.csv --locale fr_fr This will put into app/locale/fr_fr the set of CSV files that Magento can actually use for translations. You can enable them right away by configuring the store for the given locale and clearing the translation cache. If during merging (step 3) you have used the option diff, the final files will also have the column showing if the given string was translated or not. This column is skipped by Magento and can be very helpful for the translator.

Magento Translation Tools 4 Tip: You can also split the en_us locale (from all.csv) so that it will also have the latest files. This allows you to modify the default Magento English texts easily. There is also a translate.csv file created in app/local/fr_fr. It should be copied to app/design/frontend /.../locale/... for your template. 5) Translating files The files can be translated either before or after splitting. After translation, they should be reviewed and copied back to the respective directories. After clearing the translation cache they will be activated. To avoid confusion and double work, translators have to make sure they are editing the files in UTF-8 mode. One simple way to work with the files is to use the OpenOfffice Calc spreadsheet application as it properly opens UTF-8 encoded CSV files. Open the file from the menu choosing UTF-8 as the encoding. When saving, make sure the following options are used: encoding: UTF-8 delimiter:, (comma) enclosing: " (double quote) Tip: Translating files in a spreadsheet often leads to language inconsistency. Translators often use CAT (Computer Aided Translation) tools to help reuse previous translations and keep consistent naming. Magento CSV translation files can be used in an Open Source CAT tool called OmegaT - more details are available at the following wiki page: http://www.magentocommerce.com/wiki/the_ultimate_guide_to_translating_magento_using_transl ation_memory_software.

Magento Translation Tools 5 Use case 2: Generating translation files for your own modules Configuration Before the tools can be used, it is required to prepare a configuration file (config.inc.php) that lists all directories that contain translatable files, assigns files to specific translation modules, and provides mapping between helper names and module names. Mapping between helper names is required to put strings extracted from calls like Mage::helper('catalogrule')-> ("Name: %s", $this->getname()) To the Mage_CatalogRule module (and as a result in the Mage_CatalogRule.csv translation file) The default configuration includes all Magento modules and default templates. To translate your module, you need to add specifications for all your custom modules that include any translatable strings, and all your custom templates - or you can replace the existing configuration with the configuration related only to your module. There is also a section referring to the 'translate' module. All template files that are not related to any specific module should be assigned to there. A sample configuration for a payment module TestPay that has its own layout files: $CONFIG['translates'] = array( ); ), 'Testproject_Testpay' => array( 'app/code/local/testproject/testpay/', 'app/design/frontend/testproject/default/layout/testpay.xml', $CONFIG['helpers'] = array( 'testpay' => 'Testproject_Testpay', );

Magento Translation Tools 6 Usage 1) Extract translatable strings When your configuration file is ready, it's time to extract the translatable strings from the PHP code into the CSV files. php -f generate.php -- --output testproject.csv This will create the file testproject.csv containing all the extracted strings, the module to which they belong, the file from which they were extracted, etc. As the file is created in the Magento root directory, move it to the tools/translate directory. 2) Split translations The final step involving translation tools is to split the file created in step 1 into one or a set of files readable by Magento. php -f split.php -- --input testproject.csv --locale en_us This will put into app/locale/en_us a set of CSV files (one for each module declared) that Magento can actually use for translations. You can enable them right away by configuring the store for the given locale and clearing the translation cache. Summary Magento makes it possible to create multi-language international stores with ease due to its flexible translation architecture, full support for UTF-8 encoding, and ability to change text both on the file level (translation files) and on the database level (inline translations that override file translations). Thanks to the community, Magento has been translated into many languages, fully or partially. The tools described above make it easy to reuse community translations in your own projects and provide base translation files for your own modules and extensions. Happy translating!