This article describes how to create translation for Joomla! specific extension. As example we will build Czech language for Phoca Gallery component.
1) We will prepare folder structure for the new created translation. Create the following folders on your disc:
Open text editor and paste there the following content:
Save it as index.html in both folders (as lang/admin/index.html and lang/site/index.html).
2) Unzip the Phoca Gallery component ZIP file somewhere on your disc. Go to:
- language/en-GB/ folder (which is included in the unzipped Phoca Gallery structure)
and open both files:
in text editor. Translate the strings to your langauge and save them as (in our example we use Czech prefixes):
Files should be saved as UTF-8 without BOM encoding.
3) Open text editor and paste there the following content:
<install type="language" version="3" client="both" method="upgrade"> <name>cs-CZ.com_phocagallery</name> <tag>cs-CZ</tag> <creationDate>17/05/2018</creationDate> <author>Jan Pavelka</author> <authorEmail></authorEmail> <authorUrl>https://www.phoca.cz</authorUrl> <copyright>(C) 2018 Jan Pavelka</copyright> <license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <description>Czech language pack for Phoca Gallery</description> <administration> <files folder="admin"> <filename>cs-CZ.com_phocagallery.ini</filename> <filename>cs-CZ.com_phocagallery.menu.ini</filename> <filename>index.html</filename> </files> </administration> <site> <files folder="site"> <filename>cs-CZ.com_phocagallery.ini</filename> <filename>cs-CZ.com_phocagallery.menu.ini</filename> <filename>index.html</filename> </files> </site> </install>
Edit it and ave it as :
- lang/install.xml file.
So now you should have the following folder structure in the folder lang:
Select all files included in lang folder and add them into ZIP file called lang-prefix-LANG-PREFIX.com_phocagallery.zip (in our example the file will have the following name: cs-CZ.com_phocagallery.zip)
Now the translation is ready and can be installed via standard Joomla! installation procedure.