"Country" in defaults file

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
wwycheuk
Junior
Posts: 20
Joined: Thu Sep 10, 2015 4:56 am
Hong Kong

"Country" in defaults file

Post by wwycheuk »

Could anyone tell me what's the use of the "Country" tag inside defaults file? And is there anyway to specify the "Country" under "Scan configuration" in defaults file? Thank you.
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: "Country" in defaults file

Post by PhilB »

Hi there.
Would you like to say which default file?
.. And which scan do you mean?
You are running which version of mythtv?
That would help those who may be able to help you.
Regards
Phil
wwycheuk
Junior
Posts: 20
Joined: Thu Sep 10, 2015 4:56 am
Hong Kong

Re: "Country" in defaults file

Post by wwycheuk »

Hi,
'defaults file' means the xml file under /locales, which is used to set various default values during MythTV startup.
'Scan' means under 'Input connections' > 'Scan', before one do tv channels scanning, there is an option to choose country, default value is 'Australia'. Other options include 'United Kingdom', 'Germany', etc.
I am using 0.27.5
Thanks.
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: "Country" in defaults file

Post by dekarl »

PhilB wrote:Would you like to say which default file?
Its about Locale Configuration files.

The "Country tag" sets the setting named "Country" in the database. But I'm not 100% sure what this setting influences. But https://github.com/MythTV/mythtv/blob/m ... ttings.cpp hints that it is used to find the right translation. e.g. British English vs. American English.

According to https://github.com/MythTV/mythtv/blob/m ... etting.cpp the country code of the locale will also be used to default to the correct frequency table, if one has been defined. Here are some samples of additions of new frequency tables for DVB-T in various countries https://github.com/MythTV/mythtv/commit ... etting.cpp
wwycheuk
Junior
Posts: 20
Joined: Thu Sep 10, 2015 4:56 am
Hong Kong

Re: "Country" in defaults file

Post by wwycheuk »

to point 1: Isn't the translation decided by "Language" tag alone? For example en_GB already includes the country info (at least the example locale config file shows that).

to point 2: If this is the case, this is exactly what I am looking for.
wwycheuk
Junior
Posts: 20
Joined: Thu Sep 10, 2015 4:56 am
Hong Kong

Re: "Country" in defaults file

Post by wwycheuk »

So what should be used in the xml file? Lowercase (i.e. gb), Uppercase (i.e. GB) or full name? As a convention, country codes should be given in lowercase instead of uppercase.
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: "Country" in defaults file

Post by dekarl »

wwycheuk wrote:So what should be used in the xml file? Lowercase (i.e. gb), Uppercase (i.e. GB) or full name? As a convention, country codes should be given in lowercase instead of uppercase.
According to our wiki and ISO 3166-1 it should be uppercase "HK".
wwycheuk
Junior
Posts: 20
Joined: Thu Sep 10, 2015 4:56 am
Hong Kong

Re: "Country" in defaults file

Post by wwycheuk »

Thanks for the answer. But "HK" is not a valid option for now, as there is no frequency table entry for Hong Kong :)

I have submitted a bug report for this: https://code.mythtv.org/trac/ticket/12551
Post Reply