diff options
Diffstat (limited to 'platform/ios/src/MGLMapAccessibilityElement.mm')
-rw-r--r-- | platform/ios/src/MGLMapAccessibilityElement.mm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/ios/src/MGLMapAccessibilityElement.mm b/platform/ios/src/MGLMapAccessibilityElement.mm index c1cc5304d7..240eab1545 100644 --- a/platform/ios/src/MGLMapAccessibilityElement.mm +++ b/platform/ios/src/MGLMapAccessibilityElement.mm @@ -78,7 +78,11 @@ NSMutableArray *facts = [NSMutableArray array]; // Announce the kind of place or POI. - if (attributes[@"type"]) { + NSString *languageCode = [MGLVectorTileSource preferredMapboxStreetsLanguage]; + NSString *categoryAttribute = [NSString stringWithFormat:@"category_%@", languageCode]; + if (attributes[categoryAttribute]) { + [facts addObject:attributes[categoryAttribute]]; + } else if (attributes[@"type"]) { // FIXME: Unfortunately, these types aren’t a closed set that can be // localized, since they’re based on OpenStreetMap tags. NSString *type = [attributes[@"type"] stringByReplacingOccurrencesOfString:@"_" @@ -88,7 +92,6 @@ // Announce the kind of airport, rail station, or mountain based on its // Maki image name. else if (attributes[@"maki"]) { - // TODO: Localize Maki image names. [facts addObject:attributes[@"maki"]]; } |