MapboxGeocoder.swift icon indicating copy to clipboard operation
MapboxGeocoder.swift copied to clipboard

GeocodeOptions.locale loses script and country codes

Open 1ec5 opened this issue 7 years ago • 1 comments

GeocodeOptions only passes along the bare language code to the Geocoding API. For example, even if the system locale is Traditional Chinese (Hong Kong) and the developer sets the locale property to Locale.current, the language query parameter ends up being zh instead of zh-Hant-HK. GeocodeOptions should pass along the entire locale identifier; it would be API’s responsibility to strip any components it doesn’t need or understand.

/cc @apendleton

1ec5 avatar Jun 01 '17 17:06 1ec5

Sounds good. Subtags will definitely improve results in Chinese in particular, and probably also in a couple of other languages where more than one script is used.

apendleton avatar Jun 01 '17 18:06 apendleton