Wiki Navigation
- Loading...
Overview
MediaPortal supports internationalization or translation of skin files through the use of strings.xml which is used for all skins.Skins may provide addition translation or skin files for unique 'strings' used in their skin
MediaPortal Language (Strings) files
The MediaPortal language or strings files are stored in the language folder of the application directory:
- ...\\MediaPortal\language
each language is stored in a separate strings file using the language code, e.g.:
- strings_en.xml - for English strings
There are sub-folders for each specific strings for plugins.
Instructions on creating a translation can be found in the Translator Guide.
Using translatable strings in your skin XML files
Skins may use a 'string id' in any <label> tag e.g:
- <label>924</label> = 'Menu'
String id's may also be used in Skin Expressions e.g.
- <label>#(L(291))-#(L(299))</label> = r 'Video-Runtime'
Tip: When designing skins, remember that the same words in other languages are often longer than in English so as a rule of thumb, add 30% to the width of controls..
Sample String file format
The following is the start of the English strings.xml file:
<strings> <characters>512</characters> <string Prefix="My"> <id>0</id> <value>Programs</value> </string> <string Prefix="My"> <id>1</id> <value>Pictures</value> </string> <string Prefix="My"> <id>2</id> <value>Music</value> </string> <string Prefix="My"> <id>3</id> <value>Videos</value> </string> ...
String elements
The following are the set of attributes that all string elements have:
Attribute Name |
Data Type |
Description |
---|---|---|
Prefix |
String |
The string prefix. If the user has enabled prefixes in the configuration application this string is prefixed before displaying (e.g. displaying "My Music vs. "Music") |
The following are the set of tags that all string elements have:
Element Name |
Data Type |
Description |
---|---|---|
id |
Integer |
The unique id of the string used in the application and by skin files to reference this string |
value |
String |
The translated text to display to the user |
Skin Translations plugin
There is a plugin that supports translations of unique strings used in a skin available in the MediaPortal Plugins forum: SkinTransations. However, it is not clear if development will continue.
This page has no comments.