Search code examples
iosionic-frameworkaccessibilityvoiceover

ionic with VoiceOver: how to read Chinese?


I have created an app which requires accessibility for visually impaired people. VoiceOver works perfectly for the other Chinese apps in my phone. However, it only reads out in English but not in Chinese. How can I let VoiceOver recognize Chinese?

Is this a problem concerning the language of the HTML5 document? <html lang="en" dir="ltr">

What should I do in ionic? Or should I configure my Xcode project?

Solution: replace en with zh-HK in <html lang="en" dir="ltr"> for Cantonese.


Solution

  • As a rule, two conditions need to be fulfilled in order to get content read out in the correct language, i.e. with the desired text-to-speech engine.

    1. The screen reader needs to have a text-to-speech engine for the language of the content or app, in this case Standard Chinese or Cantonese. Since other Chinese apps on your phone are read correctly, this condition appears to be fulfilled.
    2. The language of the content or the app needs to be correctly identified. This needs to be done using language tags that conform to IETF BCP 47. According to this standard, Standard Chinese should be identified as zh-cmn or cmn and Cantonese as zh-yue or yue. However, not all browsers and screen readers may support these "newer" tags, so you may still need to fall back to the older tags zh-CN and zh-HK, respectively, which are still valid.