Look for locale specific names

This commit is contained in:
Tom Hughes 2014-11-07 15:19:30 +00:00
parent cddec72be5
commit 2992564276

View file

@ -112,7 +112,14 @@ OSM.Query = function(map) {
} }
function featureName(feature) { function featureName(feature) {
var tags = feature.tags; var tags = feature.tags,
locales = I18n.locales.get();
for (var i = 0; i < locales.length; i++) {
if (tags["name:" + locales[i]]) {
return tags["name:" + locales[i]];
}
}
if (tags["name"]) { if (tags["name"]) {
return tags["name"]; return tags["name"];