Patchou's Cabana

The personal blog of Patchou

MCT Documentation – Personalize every Label

< back to Media Center Themer’s documentation index

Among other things, Media Center Themer lets you modify the text strings that are displayed in Media Center’s User Interface. This page will show you how.

Find the Strings

Media Center uses strings from its internal string tables to display most of its locale-specific content (“Guide”, “Mute”, “burn cd/dvd”, “video library”, …). Whenever you read the text labels of the menus, the music pages and the many other sections of the software, remember that the strings are loaded from a specific kind of resource: string tables. Every line/chunk of text is identified with a unique numeric identifier which allows Media Center to use the same UI files (MCML) for every language, and just load a different string table for every locale.

In the same manner you’ve learnt when modifying pictures, it is possible to enable a special logging setting to get a list of all the strings that are loaded by Media Center. Just set the LogStrings settings to 1 in the registry, as described in the Logging and Settings section of this documentation. Then, start Media Center, close it, and open the themer’s log file (again, by default, C:\ProgramData\Media Center Themer\MediaCenterThemer Log.txt). You’ll see lines such as these:

20:28:54| [diagnostic] String loaded from ehres.dll (14002): Tasks
20:28:54| [diagnostic] String loaded from ehres.dll (14071): close
20:28:54| [diagnostic] String loaded from ehres.dll (14073): shut down
20:28:54| [diagnostic] String loaded from ehres.dll (14012): settings
20:28:54| [diagnostic] String loaded from ehres.dll (6051): Guide Privacy Statement
20:28:54| [diagnostic] String loaded from ehres.dll (14003): burn cd/dvd
20:28:54| [diagnostic] String loaded from ehres.dll (14005): sync
20:28:54| [diagnostic] String loaded from ehres.dll (14030): Pictures + Videos
20:28:54| [diagnostic] String loaded from ehres.dll (14007): tune network
20:28:54| [diagnostic] String loaded from ehres.dll (12031): Fast Forward

Each line contains three pieces of information that you need to know about your strings: the source module from which the string was loaded (ex: ehres.dll), its unique identifier (ex: 14002), and its original value (ex: Tasks). There are two supported ways to change the strings: you can either specify the identifier (and optionally the source), or you can skip the “search in the log” part and simply specify what the string’s original value was. Be careful though, if you identify strings using their original text value, remember that your theme will only work on the same locale (same language) that you were using when creating the theme. For example, if you tell Media Center Themer to replace the text “Tasks” by the text “Wowbagger” and you later redistribute your theme file, only people using Media Center in English will see the new label. If, instead, you tell Media Center Themer to replace the string that has ID 14002, then your theme will work everywhere.

Apply your Modifications

Using the original text value to identify and modify a string is just a quick way to achieve what you want to do and is especially useful when testing or creating a theme for its own private use. Whichever method you choose, the end-result will go into your XML code, in the Strings sub-element of Resources. Here is an example:

		<!-- Modify four strings of text -->
		<String Id="14030">All my Pics</String>
		<String Id="14002">Wowbagger</String>
		<String Match="shut down">bye bye</String>
		<String Match="Weather">How's the weather?</String>

If you copy past the above code in your theme XML file (see Sample 4 for the complete file), you’ll notice that three labels in the start menu have been modified, two of them are shown in the screenshot below.

Modification of the "Tasks" and "shut down" labels

Remember that any of the text displayed by Media Center can be modified using this technique, it is not limited to start menu labels. All you need to do is get Media Center to show the string at least once, go into your log file, and take note of the string’s ID to make a perfect switch to whatever crazy thing you want to display instead.

Now that you’ve seen how to rewrite the user-interface’s text, let’s see how you can take complete ownership of the start menu items of Media Center.

  • Archive

  • Categories

  • Blogroll