Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support language variants #870

Open
orangejulius opened this issue May 27, 2020 · 1 comment
Open

Support language variants #870

orangejulius opened this issue May 27, 2020 · 1 comment

Comments

@orangejulius
Copy link
Member

Pelias currently has good support for returning results in multiple languages, using the lang parameter.

However, that parameter only accepts 2 and 3 digit ISO 639 codes.

There are more language variants than these codes can convey. For example, while both Portugal and Brazil speak Portuguese (ISO 639 codes pt and por), many places have names that are different in European and Brazilian Portuguese. For example, the Who's on First record for the region of Bahia, Brazil includes names for both por_x_preferred and por_br_x_preferred.

Pelias can't currently distinguish these, but we should figure out a way where it can.

In order to support this, we'll need to figure out what a new system for language codes would be (do we just accept anything in WOF? Do we use something more like UNIX locales?), and then make code changes. I'm sure at the very least both the API and Placeholder will need changes, but some importers might as well.

@NickStallman
Copy link

If regular language/locale codes could be used that would probably be best.
E.g. en_au/en-au for Australian English.

That's a fairly standard way that multilingual applications and websites differenciate between different locales and it's also what browsers send.in Accept-Language headers and is visible in Javascript as navigator.languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants