Ma7moud El-Naggar
Ma7moud El-Naggar

Reputation: 558

SimpleDateFormat And Arabic Locale

I want to format my date to Arabic locale but it doesn't work on my Galaxy Tab2 also doesn't work on Galaxy Note and gives me two different results.

Here is my code:

DateFormat format = new SimpleDateFormat("EEEE yyyy/MM/dd", new Locale(
            "ar"));
    String formatedDate = format.format(Calendar.getInstance().getTime());

Note that when I check for supported locales, I find that Android 4.0 on my Galaxy Tab2 does. But I didn't find any Arabic locales.

Locale[] supportedLocales = Locale.getAvailableLocales();

Is there any workaround to solve this issue or any library I can use for that?

NOTE:

On Roomed Android version (Android 4.1) from CyanogenMod, it works very well and support Arabic locales.

Upvotes: 3

Views: 1485

Answers (1)

user.dz
user.dz

Reputation: 1032

What it seems that the devices you bought has some Android builds not prepared for your region. So they remove Arabic support for some reasons (like to get small ROM).

May be better if get another device made for your region or flash new ROM that support Arabic (for MEA, Middle East Area) to your devices. But check for same Hardware version, You can break it.

Upvotes: 1

Related Questions