Language files – how to prepare for translating a website?
Translation of websites can be a nuisance, especially in the case of large pages where manual translation of text involves hours of work. Using a content management system (CMS), you can find language files on the server that will speed up work on creating a multilingual page. How to download them using the most popular systems, i.e. WordPress, Drupal, Joomla, Prestashop and Magento?
Language files in WordPress
WordPress is a free software provided on the basis of a General Public (GNU) license (as open freeware). It is assumed, that currently approximately 30.7% of all websites are developed on the basis of WordPress (according to a report of W3Techcs from 2018). Its popularity results from simplicity of use as well as many additional features that will increase the attractiveness of your website. It also makes it possible to download ready language files that can be sent for translation and later uploaded to the server. How to translate in WordPress?
Wordpless language files are as follows: .pot, .po and .mo. A .pot file makes it possible to create a new translation. Files with the .po extension contain information from the themes and plug-ins, while .mo files are generated after the translation is completed (i.e. a .po file is edited) and only WordPress has the possibility of reading them.
How to download a .po file from WordPress?
The most important language files that you need for WordPress translation are those with .po extension. You can download them directly from the server using your favourite software (such as FileZilla). Log into the FTP client and find the wp-content folder. All language files can be found in wp-content/languages/themes, and wp-content/language/themes. Download all files with .po extension from an active theme (e.g. twentynineteen-pl_PL.po) and active plug-ins (e.g. wp-smushit-pl_PL.po).
Uploading translation to the server
After receiving language files, you will have to upload them to the server. Keep in mind that the files should be named correctly. When creating the English-version of your website, the received .po file must be named according to the nomenclature, i.e. twentynineteen-en_GB.po. This is the only way for WordPress and the translation plugin to recognise and read it properly.
How to translate Drupal?
Drupal is also a CMS thanks to which you can create websites without the need for coding in HTML, CSS and others. Similarly to WordPress, Drupal features .po language files which can be downloaded and sent for translation. The difference is that in the case of this CMS, the language files are separate for the core and/or module, as well as for templates (the static elements on the website).
What is module, core and template in Drupal?
To say it briefly, Drupal’s core is a set of basic modules and features that will make it possible for you to start work with this system. Modules increase the possibilities of your website significantly, while templates enable to change the appearance. All those elements contain specific text within them that you will want to translate when creating a new language version of the website.
Translation of Drupal into different language
The Drupal community is well organised. Special pages are created where you can find ready language files with translation of the core, modules and templates. The ready translations of Drupal’s core into many languages can be found here. Translation of modules can be found here, while particular texts can be found here. Nevertheless, they are not complete so in some cases you will have to translate .po files yourself or download them for sending to a translation agency.
You have to be aware that this way you can only translate static elements of a page based on Drupal. All product descriptions, content on such pages as “About us” and other texts have to be copied first and sent for translation. When it’s ready, you will have to upload it again onto your website.
Xliff and HTML files
You can make your work easier using an additional Translation Management Tool. With this tool you can export and import xliff and HTML files easily. This solution will make it possible to create a new language version quickly, without the need for adding translation of subpage content manually. You can download an xliff or HTML file, send it for translation and then re-upload it to the server using the Translation Management Tool. Keep in mind that this module is not used for translation but only for file management.
Translation in Joomla with language files
How to translate in Joomla? This content management system features one type of language files. Configuration and creation of new language versions of templates are based on .ini files that can be found on the server in the /languages folder. They contain the language and type of template in their name, e.g. en-GB.tpl_beez.ini. .ini files responsible for text seen in the administrative panel are available in the /administrator folder. Their name looks the same as in the case of files responsible for creating language versions of templates.
Magento 2 language files
A different type of language files can be found in the system for managing a Magento 2 online shop. Language versions are saved with the .csv extension. To download them, you have to log into the server through the SSH console and find app/i18n/magento2translations. There, you will find language files that contain the language code in their name, e.g. pl_PL.csv. Download one of them and send it for translation and then re-upload it to the server through the SSH console. This is an easy and quick way to translate a Magento 2 shop.
Language files in Prestashop
How to translate a Prestashop? This is a popular system for managing online shops. .xlf files are responsible for language versions of pages based on this system. You can find them in /app/resources/translations. Folders are available there for different languages e.g. pl_PL or en_GB along with all .xlf files. All you have to do is download them, send them for translation and then re-upload them to the server.
Translation of websites
Keep in mind that the above language files of websites are responsible for static elements, such as “Next post” and others which cannot be edited directly from the administrative panel. Translation of content found on websites, blog entries as well as menu items have to be entered manually in most cases. Dedicated tools for particular CMSs will be helpful here (e.g. Polylang and WPML for WordPress or Translation Management Tool for Drupal).
Nevertheless, downloading ready language files from your CMS will make translation of websites significantly faster. Thanks to the above solution, you will not have to edit them yourself. Finding an appropriate company that will be able to handle translation of language files is a separate issue. Feel free to contact us. We offer professional translation of websites and we will help you solve your translation-related problems.