Locale Configurations

From MythTV Official Wiki
Revision as of 16:14, 11 October 2010 by GBee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Different countries and locales usually have their own set of requirements when it comes to the perfect MythTV configuration. The locale configuration feature is intended to provide a way for MythTV to work as well as possible 'out of the box' for everyone and reduce the time spent on tweaking settings.

N.B. Currently the files can only specify defaults for settings stored in the settings table. It is planned that their functionality will increase with time.

The xml files

It's important to understand that these files only suggest the best defaults to MythTV for a new install. They are not configuration files, modifying them on an existing setup will not override configuration already stored in the database.

The files are stored in the mythtv/locales/ directory. The naming scheme takes the iso_639-2 language code and the iso_3166-1 country code combining them into a standard locale string e.g. pt_BR, en_US. This should match your system locale as reported by `locale` (on linux). The files are given the suffix .xml.


Script.png en_GB.xml

<?xml version="1.0" encoding="UTF-8" ?>
<mythlocale>
  <!-- Global Settings -->
    <!-- EIT, Subtitle, Audio Stream Language Preferences -->
    <setting name="ISO639Language0" global="true">eng</setting>
    <setting name="ISO639Language1" global="true">eng</setting>

    <!-- Recording -->
    <setting name="TVFormat" global="true">PAL</setting>
    <setting name="VbiFormat" global="true">PAL Teletext</setting>
    <setting name="FreqTable" global="true">europe-west</setting>

    <!-- Scheduling -->
    <setting name="prefDupMethod" global="true">8</setting> <!-- Subtitle then description works best with UK guide data -->

    <!-- Advert Detection -->


  <!-- Per-host Settings -->
    <!-- Languages - the language code, not the locale code! Should match the translation file. -->
    <setting name="Language">en_GB</setting>

    <!-- Country -->
    <setting name="Country">GB</setting>

    <!-- Date/Time format -->
    <setting name="DateFormat">ddd d MMM</setting>
    <setting name="TimeFormat">hh:mm</setting>
    <setting name="ShortDateFormat">dd/MM</setting>

    <!-- Playback -->
    <setting name="EnableMHEG">1</setting> <!-- Red button, interactive services -->

  <!-- Plugins -->
    <!-- MythArchive -->
    <setting name="MythArchiveVideoFormat">PAL</setting>
</mythlocale>

The above is just an example, the choice of settings is left open with certain caveats. You should not enforce personal or aesthetic choices via the locale files, they should modify only those settings where there is a clear benefit for the majority of users in your country.