Escolar Documentos
Profissional Documentos
Cultura Documentos
TM
Page 1
Translating Websites
Summary
Difference between static and dynamic websites ............................................................ 3 Translating static HTML pages ......................................................................................... 4 Manual translation ........................................................................................................ 4 Translating using CAT systems - Trados ...................................................................... 8 Translating dynamic HTML pages ..................................................................................... 16 Translating Joomla-based websites ............................................................................... 16 Configuring Joomla to handle several languages ....................................................... 17 Installing the Joomfish module for translations ........................................................... 21 Using the JoomCAT component ................................................................................. 25 Reference....................................................................................................................... 31 Joomla ........................................................................................................................ 31 Joomla components for translations ........................................................................... 31 Trados / Tag Editor ..................................................................................................... 31 Copyright and disclaimer ................................................................................................ 32
Page 2
Translating Websites
Difference between static and dynamic websites
The pages of websites we browse on the Internet everyday can be grouped into 2 large categories: 1) Static HTML page and 2) Dynamic HTML pages. Static web pages are composed by a series of HTML (Hypertext Markup Language) instructions that are then interpreted by your browser to display the contents properly. On the other hand, dynamic pages are created by the web server on account of a script language, extracting data from a database and merging text and images in HTML instructions that are then sent to your browser.
A dynamic page can be easily spotted as the address bar of your browser will show something like:
http://www.translatorstools.com/joomla/administrator/inde x.php?option=com_content#
a question mark after the URL and file name indicates the following data shall be considered as parameters for the script (index.php) execution.
http://www.translatorstools.com/index.html
The presence of just one HTML page (index.html) is not a sure proof it is a static page, as often tools that generate dynamic pages are programmed to simulate static page to improve their rating with search engines (Google, Yahoo, etc.). Translating Websites (Joomla/Trados) Page 3
The "manual" (without Computer Aided Translation Tools, CATs) translation of static websites poses no relevant problem: HTML documents can be easily edited by any recent word processor that provides HTML facilities. Let's see how a static HTML page is displayed in Internet Explorer:
To manually translate the pages without using CAT tools, you can open the page file in any editor such as MS Word, DreamWeaver or NotePad. To open a web page in MS Word:
Page 4
Select the "Open" command and browse to the file to open. Since ver. 2003, MS Word can edit HTML files directly. The previous page shows up this way when opened in Word :
Page 5
The document can be modified, so the original text can be replaced by the corresponding translation. The same HTML page can be opened by a simple text editor such as Windows NotePad.
Page 6
In this case you shall select "All files (*.*)" as file type, as NotePad can open any file format, but its default file format is Simple text (.txt). NotePad will show our web page this way:
Besides the text/content you can see HTML commands (tags), i.e. the instructions decoded by browsers to properly format contents and images. HTML tags are always included between < and > and shall be terminated by the / symbol, here are some examples:
Page 7
a) Editors such as MS Word, FrontPage and even Dreamweaver might add additional tags that would compromise the format consistency between the original and the translated versions. b) Changes to HTML tags might make the translated pages unreadable or give them a messy formatting.
It is thus absolutely recommended using a CAT (Computer Aided Translation) tool to translate static HTML pages.
a) When properly set up, CAT editors show just the text to be translated, deleting or hiding HTML tags b) In case of later reviews, such as changes to formatting or graphics, legacy contents can be easily updated, translating the new sections only c) The appearance of translated pages will precisely reflect the original d) Translation memories help avoiding re-translation of repetitive contents Trados 2007
Trados is the most popular CAT tool in the world, so we'll see how to use Translators Workbench and TagEditor to translate static web pages. Even if Trados 2007 includes additional components for MS Word, MS Word + Trados is NOT the best solution to translate web pages. Opening the translation memory
Opening an existing Translation Memory (TM) o creating a new one through Translators Workbench is the first operation:
Page 8
To open an existing TM from Translators Workbench, select File->Open and locate the previously created TM file. If you need to create a new TM, select File->New; a language selection form displays for both the original (source) and the translation (target) language:
Page 9
Select the required language pair and click on "Create"; a new form displays prompting for the path and name for the new TM. I recommend creating a dedicated folder on your hard disk (e.g. TM\French) where all the TMs will be saved, for easier retrievals and updates. At the end of the TM creation, Translators Workbench will be available on top of the screen, the TM name on the window bar and the language symbols in the lower right corner.
Let's now open Trados TagEditor to actually translate the contents. In TagEditor, select File->Open and locate the HTML file to be translated. TagEditor can open several file formats and the default file type is All documents (*.*), therefore the file list will include all the files in the folder, regardless their format. Select the file with the HTM or HTML extension; the software recognizes the web page format and displays the following message:
TagEditor detects the "mixed" (contents and tags) format of the file but cannot find a suitable tag settings file to properly decode the document. Clicking No aborts the operation. Translating Websites (Joomla/Trados) Page 10
TagEditor uses DTD (Data Tag Definition) files to decode tags; they are simple INI files including HTML tags and the corresponding action required during editing. This might sound complicated but the good news is TagEditor already include default settings to translate HTML pages and a special wizard to create DTD files. Clicking on Yes invokes such wizard:
In the above example there are already some DTD files. If the file list is empty, you need to create a new DTD file and shall click New... The first page of the DTD file creation wizard (Tag Settings Wizard) displays:
Page 11
Click Next to proceed. Type a file name in the following screen and select Based on predefined HTML 4.0 settings. A new file with default settings for HTML 4 will be created.
Page 12
Now you can directly go to End, now we shall not analyze intermediate steps that allow creating custom definition files by adding special tags. By clicking End you access the file save window - type a name for the newly created DTD file:
Page 13
You should preferably save all DTD files in the same folder, for instance the TM folder. Now TagEditor is ready for work and the new DTD will be displayed in the DTD file list click Select to activate it for your translation:
Page 14
Now we can proceed with the translation in TagEditor - here is how our index.html file is displayed in TagEditor:
The grey boxes represent HTML tags and you can translate the text only, which is clearly, neatly editable. For further details on using TagEditor please refer to SDL International tutorials.
Page 15
a) Easy creation of pages, even for a novice b) Automating visitor interaction tools, such as registration forms, catalogues, ecommerce facilities, etc. c) Quick creation of multilingual version of the site while preserving the original format and layout d) Improved web visibility, due to a better indexing by search engines e) Ease of upgrade for site functions through the installation of software add-ons
There are many other benefits that make this solution the best option for web publishing, but making life harder for translators as the translation process cannot be the same as for static HTML pages. Contents of a Joomla-based website are spread in a database and not included in a linear document, as in HTML static pages. Besides, even if your browser receives data that can be saved to an HTML file as if it were a static page, the translated file cannot be reimported into the CMS-based website (unless you forfeit the basic CMS functions). However there are CMS components/add-ons that simplify translation operations - in this document we'll analyze the translation of Joomla-based websites.
Page 16
Joomla is one of the most popular CMSs - countless add-on modules are available to customize its basic features and appearance, its contents and page layouts are managed by scripts and a database installed on the web server. Translating a Joomla-based web site requires a different approach compared with translating common static HTML pages. One of the Joomla advantages (already mentioned among those common to most CMS systems) is the possibility to rapidly implement several languages while maintaining the site general appearance. We'll now see how to translate a Joomla web site using free and paid tools. Let's assume you need to translate a web site into one or more languages: first, you need to check whether the Joomla installation includes the language packs for the required languages. Language packs are files containing the translations of Joomla standard contents (menus, buttons, on-screen labels), both for site visitors (Frontend) and for the administration section (Backend). N.B. You need ADMINISTRATOR level access permission to perform all the operations described in the following sections. Configuring Joomla to handle several languages
To check whether language packs you can access the administration area, which is usually located at the following address:
http://www.sitename/administrator
where sitename is the name of the web site you are working on. A screen with access credentials and the selection of the desired language will be displayed:
Page 17
Before installing one or more Joomla language packs you need to download them from a Joomla support web site. Joomla is an Open Source program, i.e. it is available for free courtesy of thousands developers all over the world that develop, implement and update it on a voluntary, free basis. The same principle applies to the language packs, that can be freely downloaded from this address:
http://extensions.joomla.org/extensions/languages/translations-for-joomla
you can download language packs to your PC to install them on your Joomla web site. NB Pay attention to the Joomla version used, written below the language pack description. As of now (2011), the most popular current version is 1.5, but you can also find language packs for older or newer versions.
Page 18
Many language packs are available in 2 versions: Frontend and Backend (Administration). If you want to use the backend in the new language you have to download both language packs. When you have the language pack zip files in your PC you can install them in Joomla and select the default language, if you have not yet done so. After you have typed the correct Administrator user name and password in the Administration login screen, you'll see the Joomla management home page:
Page 19
The installation process of a language pack is the same as any other Joomla extension module and is carried out by selecting Extensions->Install/Uninstall from the main menu. A click on such menu option invokes the add-ons/extensions installation screen:
1) Uploading it from your PC 2) Installing it from a web server folder 3) Installing it from a URL of another web server
As we assume we have downloaded the language packs we need into our PC, we'll use mode 2); by clicking on Browse you can select the .zip file of the language pack to install, then clicking "Upload and install file" installs the selected file. The operation shall be repeated for all the language packs to install. If you access the Extensions->Management section after a successful language pack installation you'll see the installed language packs and have the option to select the default (by clicking on the Default star icon after its selection). The "Administrator" page indicates the availability of language packs for the administration section (backend) too.
Page 20
Several add-ons/components are available to translate Joomla web sites, the most popular being Joomfish, freely available from:
http://www.joomfish.net
Once you have downloaded the Joomfish installation .zip file, access Joomla as Administrator and proceed as described above to install the language pack (Extensions>Install/Uninstall).
Page 21
After uploading and installing the Joomfish component, when accessing Components>Joomfish you will see the content translation menu:
Before proceeding to the actual translation of contents you need to copy contents from the base to the target language: access the "Manage translations" option on the Joomfish menu.
Clicking on Copy original to language shows an additional window from which you can select which elements to copy from the base (original) language to the selected language(s):
Page 22
Select Contents to copy texts of contents/articles from the original to the selected language. At the end of the operation (it might take a long time, based on the volume of present contents) the program displays a summary confirming the performed operation. Now you can proceed to translation, editing contents in the new language aside the original texts via the Joomfish component.
Page 23
By selecting the target language and - for instance - Contents you will see a list of available articles; clicking on an article title you can access the translation screen with the original text (in read-only mode) and the corresponding text in the same original language, that you will change/translate into the target language.
Therefore the JoomFish component simplify the translation of Joomla-based dynamic sites, yet it doesn't permit the use of CAT (Computer Aided Translation) tools such as SDL Trados to automate the translation process.
Page 24
JoomCAT (http://www.joomcat.com) is a Joomla add-on component that extracts contents from your Joomla-based website and saves them in a CAT-compatible format (that can be opened by most popular tools such as Trados, SDLX, MemoQ, DejaVu, ecc.). Contents saved this way can then be translated in your familiar CAT software and later re-imported into Joomla through the JoomCAT import function. You will thus match all the advantages of a CMS (Content Management System) such as Joomla with the power of CAT tools to achieve: Quicker, more professional translations Translated page layouts matching the originals Archiving translation segments to speedup and ease later reviews Saving countless work hours!
FIG.27 JOOMCAT.COM
JoomCAT is a commercial component, is conveniently priced at 99 $ and can be used in an unlimited number of sites/domains. The installation process for JoomCAT is virtually the same as for JoomFish.
Page 25
1. Access Joomla as Administrator 2. Select Extensions -> Install/Uninstall 3. Select the .zip file you downloaded from JoomCAT.com and then Install
The component successful installation will be confirmed on screen - from then on the JoomCAT components will be available and shall be activated before its first use. Access Components -> JoomCAT - > Control panel and select System-JoomCAt in the right frame. You will access the JoomCAT setup screen.
In the setup screen select "Activated - Yes" to activate the component, then click on "Save" or "Apply" on the top right:
Page 26
Now JoomCAT is active and ready for use. In the Article management section you will now see the Export button in the top command toolbar:
After selecting the articles to export for translation, click Export to download an XML file that can be open by Trados for translation. As TUTTI selected contents are saved in one file, you might consider splitting contents through more files (simply repeat the operation with different selections) to avoid creating very large files. Every created files has a unique name (something like joomcat100020111013003723.xml) that you can before saving it to your PC.
After the JoomCAT generated file has been saved in XML format (if you change the file name be sure not to change the .xml extension) you can proceed to translation using Trados Tag Editor. In TagEditor, select File->Open and browse to the XML file to translate; the program will detect the XML and - if you're opening an XML file for the first time, you might see a prompt like this:
Page 27
TagEditor detects the "mixed" (contents and tags) format of the file but cannot find a suitable tag settings file to properly decode the document. Clicking No aborts the operation. TagEditor uses DTD (Data Tag Definition) files to decode tags; they are simple INI files including XML (or HTML) tags and the corresponding action required during editing. This might sound complicated but the good news is TagEditor already include default settings to translate XML contents and a special wizard to create DTD files. Clicking on Yes invokes such wizard:
Page 28
The example above shows some DTD files that are already in the system; should your list be empty you need to create a new DTD file through the previously described process (see pages 10 and following), or load the joomcat.ini file included in the JoomCAT package (through the Open button in the Tag Settings Manager).
After you have completed the translation in Trados Tag Editor, save the translated file through the Save target As option in Tag Editor and assign a file name different from the original (eg. joomcat100020111215094732_EN.xml).
Page 29
Let's now go back to the Joomla-based web site administration back office to import the translated file: access the backend as Administrator then select Joomla Components>JoomCAT->Control panel, press Browse on the top right button to select the translated file and click on the Import icon:
Before clicking on Import, make sure you selected the correct language for the import from the selection box on the left. Translated contents will be inserted into the sections of the corresponding language. You can eventually access and edit the translations through Components->Joomfish-> Translation, as described above.
Page 30
Reference
Page 31
The contents of this publication are supplied for information and shall not constitute any warranty, either direct or implicit, of feasibility or suitability for the readers needs.
The author of this publication cannot be held responsible for any damage o missed profit due to the use of the information contained within or the use of products mentioned.
Any unauthorized reproduction of this publication without written authorization of the authors is strictly forbidden and shall be prosecuted by applicable laws.
Page 32