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

Update README.md #87

Closed
wants to merge 2 commits into from
Closed

Update README.md #87

wants to merge 2 commits into from

Conversation

Louis-7
Copy link

@Louis-7 Louis-7 commented Apr 9, 2018

Correct locale parameter. Change "en-US" to "en_US" since "en-US" totally not working.

Correct locale parameter. Change en-US to en_US.
@ohtangza
Copy link
Collaborator

@Louis-7 Can you clarify your device condition? According to Apple's docs regarding locales (https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html), it seems that en-US seems to be right. It's also ISO standard string.

I'm also in use of this library and had no chance to encounter malfunctioning with this string.

@Louis-7
Copy link
Author

Louis-7 commented May 3, 2018

Hi, sorry for late response. I'm using android.

I was raise an issue here #86

@jamsch, Could you answer the question from ohtangza?

@jamsch
Copy link
Contributor

jamsch commented May 14, 2018

I looked at the link you sent @ohtangza Specifically this portion says to use the format:
[language designator]_[region designator] which follows the en_US pattern.

selection_039

Here's a list of locale IDs for iOS
https://gist.github.com/xta/6e9b63db1fa662bb3910b680f9ebd458

For Android, I don't think it matters so much but it seems like most examples use Language tags which returns [lang]-[region] however Locale.toString() returns [lang]_[region] and LocaleList.getDefault() returns the same format.

RecognizerIntent/EXTRA_LANGUAGE_PREFERENCE says to "use a locale string like 'en-US'." and doesn't elaborate beyond that.

@Louis-7
Copy link
Author

Louis-7 commented May 14, 2018

I did some search and I find a post here -> How to set the language in speech recognition on android? which excetly match the source code, it says "en-US" is the right parameter.

But on my phone I'm sure about that [language designator]-[region designator] is not working for me, maybe I'm using a different language option from "en-US" but when you guys test the library you just use the English by default?

Maybe different version of OS have different format of language options. We may do more test on it.

@jamsch
Copy link
Contributor

jamsch commented May 14, 2018

@Louis-7
Yeah, I also read that. I'm not so sure it matters too much. One of the follow up comments also suggest using 'en_US' instead, which is the same format as java.utils.Locale.toString(). Android hasn't documented this clearly.

Update comments for language setting (not finalize)
@jamsch
Copy link
Contributor

jamsch commented May 14, 2018

Just a note: iOS locales use the [language designator]_[region designator] syntax so it's probably best keeping 'en_US' as the default.

@Louis-7
Copy link
Author

Louis-7 commented May 14, 2018

Anyway, we should find a way to notice other developers. Other people may have this issue either.

@sibelius
Copy link
Collaborator

sibelius commented Nov 3, 2018

better add this to another section of readme

@Louis-7 Louis-7 closed this Sep 4, 2023
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

Successfully merging this pull request may close these issues.

4 participants