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

get_regions('es') doesn't get any Spanish locale #18

Open
jsocol opened this issue Jun 11, 2012 · 1 comment
Open

get_regions('es') doesn't get any Spanish locale #18

jsocol opened this issue Jun 11, 2012 · 1 comment

Comments

@jsocol
Copy link

jsocol commented Jun 11, 2012

Currently, we have support for over-specifying a locale, e.g.:

product_details.get_regions('fr-FR')

will return the same data as get_regions('fr').

But we don't support underspecifying a locale, for example:

product_Details.get_regions('es')

will return English, because that's the fallback.

The accept-languages spec says we can return anything. I'm guessing es-ES would probably be best in that case, but

  • I don't actually know it's the best.
  • This isn't accept-language, we don't have to adhere exactly.

A motivating example of this is SUMO, which has a single es locale, instead of the various es-* that product_details has.

@fwenzel
Copy link
Member

fwenzel commented Jun 11, 2012

This heuristic would also be kind of expensive (parse file list, search through it for a certain pattern, so we should make sure we don't run it too often.

Another place to fix it at would be on the data side. Symlink in SVN from es -> es-ES? I do fear that if we pick any then we'll run into edge cases where people do not just want "any" flavor of their language :-/

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

No branches or pull requests

2 participants