In OpenStreetMap names of places are usually denoted in the local language. Variants of a name translated into other languages can be added. In most situations it is desirable to display the name in the local language of the viewer of the map, not the local language of the placemark. For example, the following placemark exists in Budapest: name => Magyar Nemzeti Bank name:de => Ungarische Nationalbank name:en => Hungarian National Bank name:es => Banco Nacional de Hungría name:fr => Banque nationale hongroise On a device with a hungarian locale (QLocale::system::uiLanguages() reports some 'hu' variant), the placemark should be displayed as "Magyar Nemzeti Bank". A German system should display "Ungarische Nationalbank". For an italian system a proper translation is missing, but it might be preferrable to display the english variant "Hungarian National Bank" instead of the local one. To implement this, we need to - determine the language code of the placemark: Which country do the placemark's coordinates belong to, what is its locale? - come up with a list of acceptable display locales. This can likely be extracted from QLocale::system::uiLanguages(), which already includes a preference order. - Choose the best (in order of preference) translation alternative and display that Re-using the example above and an italian device, this might result in - language code of the placemark: 'hu' - acceptable display locales: ('it', 'en', 'es') - mapping: ('it' => N/A, 'en' => 'Hungarian National Bank', 'es' => 'Banco Nacional de Hungría') - the displayed name would become 'Hungarian National Bank' as the most preferred variant If no mapping is found (e.g. for a chinese device that only reports ('zh') as acceptable locales), the original name should be chosen.
To get started, have a look at this patch: https://git.reviewboard.kde.org/r/124744/
Implemented in GeoDataPlacemark::displayName() now.