Opened 9 years ago

Last modified 6 years ago

#693 new enhancement/feature request

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

Reported by: korrosa Owned by: KaZeR
Priority: minor Milestone: version 0.6.0
Component: core Version: git master
Severity: Keywords: i18n, config, xml
Cc: sebastian.leske@…

Description

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.

Change History (2)

comment:1 Changed 8 years ago by sleske

  • Cc sebastian.leske@… added

comment:2 Changed 6 years ago by usul

  • Keywords i18n config xml added
  • Milestone set to version 0.6.0

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.

Note: See TracTickets for help on using tickets.