aerostitch / testnavit

0 stars 0 forks source link

Change language="" attribute in config tag to locale="", or split into language="" and country="" #49

Open aerostitch opened 13 years ago

aerostitch commented 13 years ago

Issue migrated from trac ticket # 693

component: core | priority: minor | keywords: i18n, config, xml

2010-11-10 05:25:44: korrosa created the issue


So recently it's emerged that you can configure navit.xml to change the locale of Navit, forcing it to use a language and country which you've set. This is currently done in the config tag:

<config ... language="en_GB">

This will force Navit to use the English translation, and also to set the active country to Great Britain (for town/street searches, etc).

Problem: language means language, however the attribute holds both a language and a country. Without documentation, it's not clear what value to assign to this attribute. In theory, you can have:

<config ... language="en_FR">

...so that Navit will use the English translations, but set France as the active country.

I propose two solutions to make this clearer:

1: Split up the language attribute into language and country. The language code is the ISO 639-1 language code: http://en.wikipedia.org/wiki/ISO_639-1_language_matrix. The country code would be the ISO 3166-1 alpha-2 two letter country code: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. Navit should accept all versions of upper and lower case (i.e. make the codes case insensitive)

<config ... language="en" country="GB">

Country may also be called territory. Personally, country is an easier concept, and easier to translate, though doesn't always map well (i.e. GB isn't really a country!)

  1. Replace the language attribute with locale:
<config ... locale="en_GB">

Use of the word "locale" means people should understand that it will require a value with both language and country.

aerostitch commented 11 years ago

2013-07-18 10:17:36: usul

aerostitch commented 11 years ago

2013-07-18 10:17:36: usul commented


Both sound wise to me.

As this will break (softly) the config file with old ones, I will schedule it to the next major release.