Page tree


Search


 Recently Updated



 Latest Releases

 MediaPortal 1.20 
            Releasenews | Download
 MediaPortal 2 2.2 
            Releasenews | Download


On 24 Sep 2010, chefkoch suggested that this page or section is outdated and needs to be updated

  Transifex Several MediaPortal Plugins and MediaPortal 2 now use Transfex for translations. See the Translation Guide under MediaPortal 2 for details.

Overview

How to translate MediaPortal 1 into your own language, or update and improve existing translations.

Introduction

Submit Translations to Development Forum:  Submit: Localization of MediaPortal and DeployTool

You may also use the MediaPortal Language Tool to assist you in translating both the MediaPortal User Interface and the Deploy Tool.

Starting a new language

When you want to translate MediaPortal into a language that is not yet available you will base the translation on the English one. To do this go to the folder where you installed MP and go into the "language" subfolder. You will see a folder for each language that has a translation available in MediaPortal. Now make a copy of the folder "English" and rename the copy to the language that you are translating to.

Now go into the folder you just made and open the "strings.xml" file. You can open it with any text editor you like. Notepad will do. The strings.xml file contains all the strings that can be translated in MP.

First you have to make sure that the correct encoding is used. The encoding that is required depends on the language that you are translating into. The encoding is defined in the first line of the strings.xml file. It looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

The encoding displayed here is suitable for most West-European languages. To find the most suitable encoding for your language have a look at: http://en.wikipedia.org/wiki/ISO_8859#The_Parts_of_ISO_8859

Next we have to specify how many characters that MP must be able to show. Some languages require more characters than other languages and since all characters are loaded into video memory by MediaPortal it is good to not have too many characters, therefore it can be configured. The default value is 255 characters and is fine for most European languages. If you need more characters then you can increase the amount in the "characters" tag in the strings.xml file.

<characters>255</characters>

Just change the number to let MediaPortal generate more characters. Also note that increasing the amount of characters will make the startup time of MediaPortal longer.

Now the real translating starts. Just go through the whole strings.xml file and translate the English strings into your language. Try to let the translated string have about the same length as the original English string. Otherwise you might notice that the text does not fit in the space that is available in the skin.

When you think that you are done with the translation, save the strings.xml file, start MediaPortal, select your language and check if the translation is correct.

If you are happy with your translation you can upload it to the patches section on the MP Sourceforge site (http://sourceforge.net/tracker/?group_id=107397&atid=647927). Make sure you drop a note in the forums or on IRC so that the developers know that there is a new translation waiting so they can add your translation to MediaPortal.

Keeping the translation up-to-date

With every new release of MediaPortal there can be new strings that need to be translated. Luckily it is quite simple to keep the translation up-to-date. When there are strings missing from a language file MediaPortal will log them at the beginning of the "mediaportal.log" file. These entries look like this:

7-9-2004 18:44:08 language file:language\Dutch\strings.xml is missing entry for id:4 text:TV Guide
7-9-2004 18:44:08 language file:language\Dutch\strings.xml is missing entry for id:3 text:My Videos

The example shown here states that ID 3 and ID 4 are missing from the Dutch language file (note that MP will only generate such warnings for the language that is currently selected). Text is the English text that still has to be translated. All you need to do now is add the missing ID's to the strings.xml file for your language. You can type these manually or copy them from the English strings.xml file.

If you have finished updating the translation you can upload it to the patches section on the MediaPortal Sourceforge site (http://sourceforge.net/tracker/?group_id=107397&atid=647927). Make sure you drop a note in the forums or on IRC so that the developers know that there is a new translation waiting so they can add your translation to MediaPortal.

Common problems

This section describes some problems that you might encounter while translating MediaPortal.

You selected your new/updated language and MP shows everything in English.

This can be a problem in the .xml file. You might have made a typo in the xml, deleted something too much or made a wrong copy-and-paste. Take a look at the "mediaportal.log" file for more information on the problem. Most of the time MediaPortal will show you the line number where the error occurred. This problem can also be caused by a wrong encoding.

Some characters don't show up

The amount of characters you have defined in the "strings.xml" file is probably too low.

Some characters show up as different characters

The encoding you have specified is probably incorrect. Try another encoding.

Related

See also: Localization of the MediaPortal installer and user interface

   

 

This page has no comments.