You Say Quán cà phê, I Say ร้านกาแฟ: Multilingual Categories

Ben Chodoroff - September 5, 2019

A coffee shop
Photo credit: Rongnamcha

If you’ve ever walked past your local coffee shop and asked yourself, “How do I say ‘coffee shop’ in Thai?”, you’re in for a treat when you use our streetcredlabs/categories library, because you’ll know that it’s ร้านกาแฟ!

This might sound trivial, but if you’re creating mapping software that is used by a global audience, it’s surprisingly important.

The engineering team at StreetCred is building all sorts of software to help people collect and update point-of-interest data, all over the world. We’ve been developing a common set of categories used to describe points of interest and be navigable by users adding places on location. This data lives in streetcredlabs/categories, a JavaScript library that everyone is free to use in their mapping software.

As a starting point, we looked at the Who’s on First project by Mapzen. We made some changes to make the categories more accessible to end users. We have done some work to apply concordance data to SIC codes, which we will release in the future. For now, we’ve included some additional data to help with many projects: each category has a list of relevant fields (i.e. a bagel shop might have a phone number, website, wheelchair accessibility, and outdoor seating) and an icon key that can be used in a map.

Now that we’ve added internationalization to this library, all of the category names can be translated so your mapping application is more useful to non-English speakers. We chose the lingui library because it works in a variety of different JavaScript projects, is lightweight, and uses time-tested standards like the gettext po files and ICU message formatting.

We got the ball rolling with a handful of languages common in Southeast Asia: Simplified Chinese, Malay, Indonesian, Vietnamese, Thai, and Filipino. If you’d like to help add another language, let us know, and we can help with the process.

If you’re a programmer, you can read more about how to use the new translations or add new translations in the project’s README.

Please share any feedback in the issue queue, and submit new translation sets as a pull request. We hope to collaborate with other mapping projects to improve this library!