Translation

From MediaCoderWiki

Jump to: navigation, search

Contents

How to translate MediaCoder into another language

Translations of user interfaces

Most of the translatable strings are stored in XML files in the lang folder of MediaCoder's installation folder. To create a new translation, you can simply copy english.xml (or whatever) to create {your language}.xml, and open it with a Unicode-aware text editor (luckily Notepad supports Unicode). You can then start translation, by translating all the strings in "value" attributes. The language XML file is like this:

<StringTable module="mccore" language="English">
  <string id="..." value="..."/>
  ...
</StringTable>

<StringTable module="mcgui" language="English">
  <string id="..." value="..."/>
  ...
</StringTable>

You'll also need to change the language attribute of the StringTable nodes, so that it becomes:

<StringTable module="mccore" language="Your language">
  <string id="..." value="..."/>
  ...
</StringTable>

<StringTable module="mcgui" language="Your language">
  <string id="..." value="..."/>
  ...
</StringTable>

Add a new entry for your language

To add a new language entry, you need to put a new node in lang.xml. This file is in MediaCoder's folder and is like this:

<?xml version="1.0" encoding="UTF-8"?>

<languages>
  <language id="English" file="lang/english.xml"/>
  <language id="Chinese (Simplified)" codepage="936" file="lang/zh_cn.xml"/>
  <language id="Chinese (Traditional)" codepage="950" file="lang/zh_hktw.xml"/>
  ...
</languages>

Then add an entry and it becomes:

<?xml version="1.0" encoding="UTF-8"?>

<languages>
  <language id="English" file="lang/english.xml"/>
  <language id="Chinese (Simplified)" codepage="936" file="lang/zh_cn.xml"/>
  <language id="Chinese (Traditional)" codepage="950" file="lang/zh_hktw.xml"/>
  ...
  <language id="Your language" file="lang/{your language}.xml"/>
</languages>

If you are sure the systems using your language use a default code page, you can specify it in "codepage" attribute, so that your language will become the default language when MediaCoder is running on systems with that code page. Otherwise, forget about "codepage" attribute.

Settings Dialog

All strings in settings dialog are in mccore.xml and is currently not able to be switched from language setting at run-time. This will be improved soon.

Extensions

All extensions' interface are designed with HTML. So it's easy to make different language versions of them.

Document

At this moment, there is no document in any language. Hoping this awkard situation will change sooner or later.

What to do after finishing the translation

First, you need to ensure that your completed XML file is valid. An easy way to do this is to open the file with your web browser. If your file is without any syntax issues, it shall be displayed completely in your web browser. If unfortunately it is not, the browser will prompt the line and position where the error occurs and you can fix it. After that, you can test it in MediaCoder. After you modified lang.xml and added the new entry, a new item should be displayed in menu Options -> User Interface Language. Check the interface to see if there is any strings not fit in size or position and inform me if there is anything can't be fit in size always. After all, e-mail me your modified lang.xml and I will add it up-coming releases.

Current status of translations

An oudated translation means that there are some strings written in English stored in the language XML file which need to be translated. If a translation is marked as very outdated, that means the translation has not be maintained for a quite long time and it has many newly-added strings missing in it. You may need to refer to English translation to add the missing strings.

Please help to keep the translation up-to-date if you are a native speaker of one of these languages. Your contribution will help the people speaking your language to use MediaCoder's user interface in native language. Click the language links above and you will be able to get the latest translation XML file. Once you have updated the file, please e-mail the file to the author (stanleyhuangyc [at] gmail [dot] com) and he will be happy to include the updated version in up-coming releases.


Personal tools