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

  • SEARCH
  • Home
  • 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 698167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:14:43+00:00 2026-05-14T03:14:43+00:00

If you have an application localized in pt-br and pt-pt , what language you

  • 0

If you have an application localized in pt-br and pt-pt, what language you should choose if the system is reporting only pt code (generic Portuguese)?

This question is independent of the nature of the application, desktop, mobile or browser based. Let’s assume you are not able to get region information from another source and you have to choose one language as the default one.

The question does apply as well for more case including:

  • pt-pt and pt-br
  • en-us and en-gb
  • fr-fr and fr-CA
  • zh-cn, zh-tw, …. – in fact in this case I know that zh can be used as predominant language for Simplified Chinese where full code is zh-hans. For Traditional Chinese, with codes like zh-tw, zh-hant-tw, zh-hk, zh-mo the proper code (canonical) should be zh-hant.

Q1: How to I determine the predominant languages for a specified meta-language?

I need a solution that will include at least Portuguese, English and French.

Q2: If the system reported Simplified Chinese (PRC) (zh-cn) as preferred language of the user and I have translation only for English and Traditional Chinese (en,zh-tw) what should I choose from the two options: en or zh-tw?

  • 1 1 Answer
  • 6 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-14T03:14:44+00:00Added an answer on May 14, 2026 at 3:14 am

    In general you should separate the “guess the missing parameters” problem from the “matching a list of locales I want vs. a list of locales I have” problem. They are different.

    Guessing the missing parts

    These are all tricky areas, and even (potentially) politically charged.

    But with very few exceptions the rule is to select the “original country” of the language.
    The exceptions are mostly based on population.
    So fr-FR for fr, es-ES, etc.
    Some exceptions: pt-BR instead of pt-PT, en-US instead of en-GB.

    It is also commonly accepted (and required by the Chinese standards) that zh maps to zh-CN.

    You might also have to look at the country to determine the script, or the other way around.
    For instance az => az-AZ but az-Arab => az-Arab-IR, and az_IR => az_Arab_IR

    Matching ‘want’ vs. ‘have’

    This involves matching a list of want vs. a list of have languages.
    Dealing with lists makes it harder. And the result should also be sorted in a smart way, if possible. (for instance if want = [ fr ro ] and have = [ en fr_CA fr_FR ro_RO ] then you probably want [ fr_FR fr_CA ro_RO ] as result.

    There should be no match between language with different scripts. So zh-TW should not fallback to zh-CN, and mn-Mong should not fallback to mn-Cyrl.
    Tricky areas: sr-Cyrl should not fallback to sr-Latn in theory, but it might be understood by users. ro-Cyrl might fallback to ro-Latn, but not the other way around.

    Some references

    • RFC 4647 deals with language fallback (but is not very useful in this case, because it follows the “cut from the right” rule).
    • ICU 4.2 and newer (draft in 4.0, I think) has uloc_addLikelySubtags (and uloc_minimizeSubtags) in uloc.h. That implements http://www.unicode.org/reports/tr35/#Likely_Subtags
    • Also in ICU uloc.h there are uloc_acceptLanguageFromHTTP and uloc_acceptLanguage that deal with want vs have. But kind of useless as they are, because they take a UEnumeration* as input, and there is no public API to build a UEnumeration.
    • There is some work on language matching going beyond the simple RFC 4647. See http://cldr.unicode.org/development/design-proposals/languagedistance
    • Locale matching in ActionScript at http://code.google.com/p/as3localelib/
    • The APIs in the new Flash Player 10.1 flash.globalization namespace do both tag guessing and language matching (http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/globalization/package-detail.html). It works on TR-35 and can look beyond the @ and consider the operation. For instance, if have = [ ja ja@collation=radical ja@calendar=japanese ] and want = [ ja@calendar=japanese;collation=radical ] then the best match depends on the operation you want. For date formatting ja@calendar=japanese is the better match, but for collation you want ja@collation=radical
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have localized application where user can choose her preferred language in dropdown control.
I have added this file in my project with the code: Language.h: @interface Language
I have this application that has dynamic language switching built in. Based on the
I have a WinForms application with base language English. I localized a form to
I have a localized application, and I am wondering if it is possible to
Is it possible to customize a django application to have accept localized date format
I have a localized spring mvc based web application, that has an externalized messages
I have a Grails web application running on a german localized machine. How does
I have application with needs to have access to some sensitive data(in this case
I have an application that is supposed to be localized (two languages, english being

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.