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

Fix/locale codes #49

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix/locale codes #49

wants to merge 2 commits into from

Conversation

ElyesDer
Copy link

@ElyesDer ElyesDer commented Feb 8, 2022

Description
This PR fixes an issue with incompatible ISO 639-3 codes between iOS's Locale and Amazon Polly's ISO 639-3.
It was also reported here.

Implementation

  • Store all unsupported language codes returned by Locale in ISO 639-2 format.
  • If SpeechOptions's language identifier is in the list of unsupported, use the supported one instead.
  • Support Arabic (AR) and Chinese (ZH) codes
  • Add support for other unsupported languages

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing this workaround for the longstanding language code issue!

Sources/MapboxSpeech/MBSpeechOptions.swift Show resolved Hide resolved
Sources/MapboxSpeech/MBSpeechOptions.swift Show resolved Hide resolved
Sources/MapboxSpeechCLI/main.swift Show resolved Hide resolved
@1ec5 1ec5 added this to the v2.4 milestone Mar 5, 2022
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.

2 participants