Translating the Sky Template

I recently translated the Sky template to Italian and collaborated to another translation to Hungarian. I realized that the only available documentation was these two posts:
Language, translation and alternate layout (http://www.ehcp.net/?q=node/250)
How to Modify Templates, Logo (http://www.ehcp.net/?q=node/29)

So I decided to try to write a step by step procedure about translating the Sky template... here it is:

Translating the Sky Template

Make a copy of the folder /var/www/new/ehcp/templates/sky/en (and all its subfolders) and name with with the two digit code for your language (i.e. /var/www/new/ehcp/templates/sky/it for Italian).

Change the name of the following files, within the folder, to use your two digits language code:

  • defaultindexfordomains_en.html
  • defaultindexforsubdomains_en.html
  • homepage_domainadmin_en.html
  • homepage_domainadmin_forreseller_en.html
  • homepage_emailuser_en.html
  • homepage_remotehosting_dnsonly_en.html
  • homepage_reseller_en.html
  • homepage_reseller_other_en.html
  • homepage_serveradmin_en.html
  • homepage_serveradmin_other_en.html
  • loginpage_en.html
  • template_domainadmin_en.html
  • template_emailuser_en.html
  • template_en.html

Edit all the above files (now ending with the two digits for your language, i.e. defaultindexfordomains_it.html for Italian) changing the text strings from English to your language.

Make a copy of the file /var/www/new/ehcp/language/en.php using the two digits code of your language and keep it in the same folder.

Translate all the text strings inside the above file.

Find a jpg image of your flag (54px x 36px) and place it inside /var/www/new/ehcp/images renaming it with the two digits code for your language (i. e. it.jpg for Italian).

Make a backup copy of the file /var/www/new/ehcp/www.index.html with the name /var/www/new/ehcp/www.index.en.html. Edit /var/www/new/ehcp/wwwindex.html to change all text strings to your language.

Edit /var/www/new/ehcp/classapp.php around line 2713. There is a table with the list of available languages and you need to add your language code and language flag. For instance for Italian I added

<a href='?op=setlanguage&id=it'>Italian</a>

at line 2719 and

<td><a href='?op=setlanguage&id=it'><img height=30 width=50 src=images/it.jpg border=0></a></td>

at line 2729.

Make a backup copy of the file /var/www/new/index.html with the name /var/www/new/index.en.html. Edit /var/www/new/index.html to change all text strings to your language.

After testing your translation you should prepare a package with all the translated files and send it to info@ehcp.net so that your language will be included in the next release of EHCP.

Create in your computer a folder with all the modified files following this structure:

var
|__www
.....|__new
..........| index.html
..........|__ehcp
...............| classapp.php
...............| wwwindex.html
...............|__images
...............| xx.jpg
...............|__language
...............| xx.php
...............|__templates
....................|__sky
.........................|__xx
.............................| defaultindexfordomains_xx.html
.............................| defaultindexforsubdomains_xx.html
.............................| homepage_domainadmin_forreseller_xx.html
.............................| homepage_domainadmin_xx.html
.............................| homepage_emailuser_xx.html
.............................| homepage_remotehosting_dnsonly_xx.html
.............................| homepage_reseller_xx.html
.............................| homepage_reseller_other_xx.html
.............................| homepage_serveradmin_xx.html
.............................| homepage_serveradmin_other_xx.html
.............................| loginpage_xx.html
.............................| template_domainadmin_xx.html
.............................| template_emailuser_xx.html
.............................| template_xx.html

Tar the structure

tar -czf ehcp.xx.tar.gz var

and email it to info@ehcp.net (obviously you can also zip it).

Many thanks to Ákos for testing the procedure "on his skin" :-)

Forums: