Working with Modern Standard Arabic locale in PHP

Hi

I am working with locales and I have a problem dealing with the Modern Standard Arabic language in PHP.

When I do a print_r(ResourceBundle::getLocales(‘’)) I get the following list http://pastebin.com/raw/qhBawQ5C

I can see the locale ar in the list so I am assuming its available on my machine.

Now when I run echo Locale::getRegion('ar'); I get an empty value. But when I run echo Locale::getRegion('ar_BH'); I get BH.

Why is this and how can I make the ar locale work?

Thanks in advance

1 Like

As I have explained in your thread you opened at CodingForums, 'ar' does not have a Region code so Locale::getRegion() must return an empty value.

tl;dr
RTFM

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.