That is correct. It happened on my Samsung Nexus 2 and ASUS Eee Pad (All
those testing devices are using platform 4.0.x). Some other phones like
Motorola Atrix (2.3.6) displayed date with en-GB correctly. All of those
devices are purchased from US.

As I mentioned in the previous email, the Code in my App is:

Locale currentLocale = Locale.*getDefault*(); // at this point, the setting
is using en-GB
dateFormatter = DateFormat.getDateInstance(**Dat**eFormat.SHORT,
currentLocale);
String formattedDateString = dateFormatter.format(new
Date(System.currentTimeMillis(****)));

 The Date Format should be SHORT for all locales. I just try to use a
generic way to handle the date time localization.

Thanks,

Edward

On Wed, Jul 4, 2012 at 12:11 AM, Zsolt Vasvari <[email protected]> wrote:

> So are saying that if you go to Settings (NOT your code) and pick the
> Great Britain language setting, the phone shows all dates in US English
> format?
>
>
> On Wednesday, July 4, 2012 12:21:42 AM UTC+8, elin wrote:
>>
>> The getAvailableLocales returned en-GB locale. So the en-GB should be
>> available on this Samsung device and I can switch it through Settings.
>> In addition, if I choose the other locale on the 4.0.x devices through
>> the Settings, such as Deutsch. It is working perfectly as date shown
>> 03.07.2012, so what is wrong with en-GB?
>>
>> Thanks,
>>
>> Edward
>>
>> On Tue, Jul 3, 2012 at 10:56 AM, Edward Lin <[email protected]>wrote:
>>
>>> Thanks for the reply! Here is the results I got from this line of code:
>>>
>>> Locale[] allLocales = Locale.getAvailableLocales();
>>>
>>> [ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO, ar_KW, ar_LB, ar_LY,
>>> ar_MA, ar_OM, ar_QA, ar_SA, ar_SD, ar_SY, ar_TN, ar_YE, bg, bg_BG, ca,
>>> ca_ES, cs, cs_CZ, da, da_DK, de, de_AT, de_BE, de_CH, de_DE, de_LI, de_LU,
>>> el, el_GR, en, en_AU, en_BE, en_BW, en_BZ, en_CA, en_GB, en_HK, en_IE,
>>> en_IN, en_JM, en_MH, en_MT, en_NA, en_NZ, en_PH, en_PK, en_RH, en_SG,
>>> en_TT, en_US, en_US_POSIX, en_VI, en_ZA, en_ZW, es, es_AR, es_BO, es_CL,
>>> es_CO, es_CR, es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, es_PA,
>>> es_PE, es_PR, es_PY, es_SV, es_US, es_UY, es_VE, fa, fa_AF, fa_IR, fi,
>>> fi_FI, fil, fil_PH, fr, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, fr_MC, iw,
>>> iw_IL, hi, hi_IN, hr, hr_HR, hu, hu_HU, in, in_ID, it, it_CH, it_IT, ja,
>>> ja_JP, ko, ko_KR, lt, lt_LT, lv, lv_LV, nb, nb_NO, nl, nl_BE, nl_NL, pl,
>>> pl_PL, ps, pt, pt_BR, pt_PT, rm, ro, ro_RO, ru, ru_RU, ru_UA, sk, sk_SK,
>>> sl, sl_SI, sr, sv, sv_FI, sv_SE, th, th_TH, tr, tr_TR, uk, uk_UA, vi,
>>> vi_VN, zh, zh_CN, zh_HK, zh_HANS, zh_HANS_CN, zh_HANS_HK, zh_HANS_SG,
>>> zh_HANT, zh_HANT_HK, zh_HANT_MO, zh_HANT_TW, zh_MO, zh_SG, zh_TW]
>>>
>>>
>>>
>>> On Tue, Jul 3, 2012 at 10:43 AM, RichardC <richard.critten@googlemail.**
>>> com <[email protected]>> wrote:
>>>
>>>> Reading a bit further I found  getAvailableLocales ()
>>>>
>>>> http://developer.android.com/**reference/java/util/Locale.**
>>>> html#getAvailableLocales()<http://developer.android.com/reference/java/util/Locale.html#getAvailableLocales()>
>>>>
>>>> Try that and see what it returns.
>>>>
>>>>
>>>> On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote:
>>>>
>>>>> Please help me with this date time localization issue. I am trying to
>>>>> use Java.Text.DateFormat to get the default date format for different
>>>>> locale in the following.
>>>>>
>>>>> dateFormatter = DateFormat.getDateInstance(**Dat**eFormat.SHORT,
>>>>> Locale.UK);
>>>>> String formattedDateString = dateFormatter.format(new
>>>>> Date(System.currentTimeMillis(****)));
>>>>>
>>>>> When I am trying to format the date using en-GB locale for the date
>>>>> - July, 3rd, 2012
>>>>>
>>>>> Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
>>>>> Android 4.0.x result: 07/03/2012  (Wrong)
>>>>>
>>>>> Apparently, It is working at Android platform 2.2.x to 2.3.x, but in
>>>>> devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not
>>>>> work anymore. Why is this behavior different between the API level? And 
>>>>> how
>>>>> can I get the default date format for specific locale from now on?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Edward
>>>>>
>>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-developers@**
>>>> googlegroups.com <[email protected]>
>>>> To unsubscribe from this group, send email to
>>>> android-developers+**[email protected]<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>>>
>>>
>>>
>> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to