Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6892589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:33:15+00:00 2026-05-27T06:33:15+00:00

How can I convert an IETF BCP 47 language code [e.g zh-cmn-Hant-HK] into a

  • 0

How can I convert an IETF BCP 47 language code [e.g zh-cmn-Hant-HK] into a display string [e.g. “Mandarin Chinese, Traditional (Hong Kong SAR)”] in Android (Java)?

Some background. I am working with the speech to text APIs. I am calling sendOrderedBroadcast, passing a BroadcastReceiver that receives a list of supported languages thru RecognizerIntent.EXTRA_SUPPORTED_LANGUAGES. The EXTRA_SUPPORTED_LANGUAGES are provided as IETF BCP 47 codes rather than Java locale codes:
http://developer.android.com/reference/android/speech/RecognizerIntent.html

What support does Android provide for working with IETF BCP 47 codes? I am especially interested in getting display names as shown in the example above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:33:15+00:00Added an answer on May 27, 2026 at 6:33 am

    No support in Android. And in general I don’t think you will find such support outside ICU.

    So you have two options: ICU4J or ICU4C.

    For ICU4J, you should bring your own copy, because it is not there.

    ICU4C is present on Android (all the internationalization functionality in Dalvik is implemented on top of it). You can use the NDK (the Native Development Kit) to call the ICU4C from a C/C++ module, and use JNI to access you native module from Java.
    But although ICU4C is there by default, Android does not exposes it, and it’s use is strongly discouraged. Not to mention that the ICU4C data file might be stripped down big time, so the info needed to spell out the bcp 47 code might not be there.

    So the safest thing is your own copy of ICU4J. You can either deploy it with your application, or you can expose that info as a web-service for your application to consume.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can convert an integer into string using String s = + 4; //
I made a CollectionToStringConverter which can convert any IList into a comma-delimited string (e.g.
I know that you can convert a float into a string using NSString *myString
How can convert a certain file into in a String? And then from that
In MSSQL you can convert a string into an integer like this: CONVERT(INT, table.column)
Just wondering how I can convert the following string into a datetime 111222, at
In Python I can convert JSON into a useable encoded string eg: cmd2 =
How i can convert to c# code files to html files?Is there any generation
How can I convert a number contained in a string from any base to
I know you can convert a String to an number with read : Prelude>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.