With Open2b you can create multiple versions of the store that differ by language. The base template is provided with translations in Italian, English, French, and Spanish.
In this chapter you will learn how to:
Translation texts can be edited either from the back office via the Template Editor or via FTP.
Translation changes made from the back office are saved in files inside the template folder. If you need to have a translator work on the template texts, it may be more convenient to send them the files to translate rather than giving them access to the back office.
Inside the languages folder, in the template folder, there is a subfolder for each language. Inside are the two translation text files: template.ini for texts written directly in template pages and system.ini for system texts such as error messages and warnings.
The two translation files must be edited with a text editor that supports Unicode encoding (UTF-8). On Windows, Notepad is fine. If you send the files to a translator, it’s better to compress them first to avoid the email program altering the encoding.
After putting the translated files back, go to the back office at Website > Design > Customize to check them, then click Save and Apply at the top right to display them on the site.
The flags shown on the site are located in the template’s flags folder:
design/Axis/flags/
There is one flag for each language/region combination supported by Open2b. For example, for Italian/Italy the flag file is it-IT.png.
To replace a flag, simply overwrite the file with the new one. You can then check the site preview ( in Website > Design > Open Preview ) to verify it looks right, and then apply the template to the site ( in Website > Design > Apply to Site ) to show it to visitors.
To translate texts written in template HTML pages, use the translate function:
{{ translate("Forgot your password?") }}
The function reads translations from the template.ini file in the language folder. For example, for Italian the translation is in
design/Axis/languages/it/template.ini
The file contains a line like the following:
Forgot your password?=Hai dimenticato la password?
All text before the equals sign is translated using the text after it.
If the translated text must include HTML code, then in the language file use the tilde symbol ( ~ ) instead of the equals sign ( = ):
Forgot your password?~<b>Hai dimenticato la password?</b>
After editing the HTML pages and translations, you can preview the changes from the back office at Website > Design > Open Preview. Then you can apply the template to the site to make them final.