Locale Configurations

From MythTV Official Wiki
Revision as of 23:45, 28 September 2010 by Knightr (talk | contribs) (ISO639Language settings are now global and case fix on the language name)

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" ?>
  <!-- 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 - Self Explanatory -->
    <setting name="Language">en_GB</setting>

    <!-- Date/Time format -->

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

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

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.