Helping with translations:

Help support SwissCenter by providing translations into other languages!

Helping with translations:

Postby admin » Tue Jan 17, 2006 1:41 pm

This forum contains a single thread for each language currently supported by the SwissCenter and it is here that you should post translations of the english strings (or send them directly to me via email).

You may also create new threads to support additional languages if you are prepared to help out... please don't just create a thread asking for that language to be supported!

Getting Started

First of all, locate your swisscenter installation directory. If you're running on windows with Simese then this will be in one of the following locations (note I'm using slashes instead of backslashes because this forum software eats them up):

  • C:/program files/simese/data
  • C:/program data/simese/data (this is a hidden directory on Vista)
  • C:/documents and settings/all users/application data/simese/data (a hidden directory in windows)
Within the swisscenter installation directory there will be a "lang" dir, and within that you should create a directory for your language (use the ISO country code please). Within your new directory, copy the english language file (lang/en/en.txt) and rename it according to your language.

Now translate the english strings into your own language.

NOTE: You might find it useful to go into the "Advanced Options" section on the Swisscenter configuration page and turn off the caching of language strings (under "Cache options") if you want to check how your translations look as you go along.

File Format

A swisscenter languiage file consists of a mapping from internal program ID (eg: "ADD_PLAYLIST") to the actual text that should be displayed to the user (eg: "Add to your playulist") as follows:

Code: Select all
  <ID> = <text>


NOTE: The text cannot span multiple lines. If a line break or paragraph break are required within the text then markup tags should be used (see below).

The <text> may contain a limited number of markup tags which are indicated by square brackets and perform an identical function to their HTML counterparts. The following tags are supported:

  • br and /br
  • em and /em
  • p and /p
  • b and /b
  • i and /i
  • ul and /ul
  • ol and /ol
In some circumstances, other text may need to be substituted within the text. Placeholders for the position within the string where the substitution occurs are indicated with '%s'.

EG: In the ID below, the number of tracks that has been found within the database is substituted for the %s within the string... so a search returning 4 tracks would be displayed to the user as "4 Tracks"

Code: Select all
  MANY_TRACKS= %s Tracks


Finally, Lines that begin with a hash (#) are considered to be comments and are ignored.
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)
User avatar
admin
Senior Member
Senior Member
Developer
 
Posts: 1828
Joined: Thu Sep 16, 2004 4:15 am
Location: Bracknell, England
Country: United Kingdom (uk)

Re:Helping with translations:

Postby admin » Thu Oct 12, 2006 8:30 pm

You can now find out which language strings still need to be converted from within your own SwissCenter installation. Simply open http://localhost:8080/lang/differences.php and the missing language strings will be shown for each language.

Please note that this will not indicate any of the language strings which have been modified - you will still need to load the english language file (<swisscenter>/lang/en/en.txt) and review the comments. Any strings which have been modified are clearly indicated.
Server : Windows Home Server (HP MediaSmart EX470)
Player #1: Pinnacle Showcenter 200 (wired ethernet)
Player #2: Popcorn Hour A110 (wired ethernet)
User avatar
admin
Senior Member
Senior Member
Developer
 
Posts: 1828
Joined: Thu Sep 16, 2004 4:15 am
Location: Bracknell, England
Country: United Kingdom (uk)


Return to Multi-Language Support

Who is online

Users browsing this forum: No registered users and 2 guests