Are DateFormat and DateUtils supposed to be returning localized strings (1.5 emulator)?

by adamphillips12 » Thu, 14 May 2009 01:25:03 GMT

Sponsored Links

I'm currently testing localization on the 1.5 emulator (with sdk
target of 3), I'm using the Custom Locale app to apply different
locales and also I've tried setting it from Settings also. This seems
to update what loads from the res/ folder, so I'm sure this is being

However I'm trying to use the two classes
android.text.format.DateFormat and android.text.format.DateUtils,
neither seem to be returning localized strings and neither have any
option of setting the locale manually. The documentation suggests that
they should be returning localized strings. Especially
DateUtils.getMonthString() which explicitly states it. Am I missing
something on how to use these classes? I can see in the
android.R.string plenty of related string items fully translated.

If they are meant to be returning localized strings, could someone
please post an example?

Thanks :)


Other Threads

1. Execute method when background task exceeds timespan

Hi all,

i'm trying to do the following:
1. Fetching an external resource through a seperate thread;
2. When loaded this thread sends a message to the specified handler
3. This handler executes a method which sets a view to visible

All goes well, but now i want to include an extra time, so that when the
external resource is not loaded after 5 seconds, the view is going to be
displayed anyway. But here's the catch, my handler function goes well, but
when i excute the same method outside the handler, it sets the View.visible
just fine, but the view just isn;t displaying.

the code reads something like:

        Timer timer = new Timer();
        Calendar date = Calendar.getInstance();
        date.add(Calendar.SECOND, 1);
        timer.schedule(new TimerTask() {
            public void run() {

        // fetch the feed in a seperate thread
        final Handler feedHandler = new Handler(){
            public void handleMessage(Message message) {


    protected void displayArticleList(){
        Log.d("Here", "displayArticleList method: " +
ll_splash.getVisibility() + " == " + View.GONE);
            LinearLayout alc = (LinearLayout)


Patrick Plaatje


2. Advice for uploading my apps

Hi all. Just need some help before I upload my apps.

The title I wanted to give my app is too long for the small icon.
However looking at the market, I notice that other people have got
around this by giving a longer name to the app that appears on the
market list, and a shorter name to the app itself once it is

For example, the is a calculator app called "RealCalc Scientific
Calculator" but when you install it it just appears as "Calculator".

How do I go about this? Does the market ask you for an app name when
you upload, where you can put anything you like?

Also, what about the actual .apk filename - is that important, and
have any bearing on the name that appears when someone downloads the



3. Need help to find Key Performance parameters of an Android application

4. How to find Key Performance parameters of an Android application

5. Android 2.0 Installation

6. Question regarding Dev Phone 2

7. media player....