We're making translations with the help of language files. The language file is in Content->Languages tab. There we can see two files, front responsible for the main page and admin responsible for the admin panel of the system.
In order to add a new language simply add it to our file so its key (which is on the left side) is unique within the file. On the right from the “=” sign,preferably placed in quotation marks, type in the translated phrase.
When it comes to widgets, each of them has its own language file working in a similar manner, file is in the “lang” folder for a given widget.
After adding first language, we do the same thing for the second one with the exact same key on the left side.
Example langauage file:
An example of the language file:
front.form.about = About Us
front.form.services = Range of services
front.form.contact = Contact
front.form.more = More
front.form.project = Project and development:
front.form.workon = On engine:
front.form.send = send
front.form.giveemail = enter correct email address
front.form.email = Address email
front.form.giveelement = Please fill up forms space
front.form.contactformcontent = Content of the message
front.form.givecorrectemail = Enter correct email address
validator.required = "Please fill up forms space"
validator.email = "Enter correct email address"
validator.number = "Enter number"
After a succesfully carried out operation we can call out the translated phrase in our graphic template, the special code letter L is used for that:
This way we can translate both texts and parameterize images. The function simply gives us the phrase for particular language that is saved in it. Thanks to that we can transfer for example the name of the English version of a logotype and key to the page.
If we enter the key incorrectly there will be a marker displayed instead of text:
?????? front.form.givecorrectemail ??????
It will mean that system is not able to find our language key.
After adding of new phrase You have to clean the system cache by clicking the button in the right top corner of the screen. Otherwise the system won't update the changes in the file.