How to translate MediaCoder into another language

Translation for user interface

Most of the strings are stored in XML files in {MediaCoder folder}\lang. 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="Português">
  <string id="..." value="..."/>
  ...
</StringTable>

<StringTable module="mcgui" language="Português">
  <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.  

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 to next update release.

Leave a Reply