Does ICU (php Intl extension) provides a way to detect the direction of a language (rtl/ltr) ?
Direction is a script data. A language can use many scripts and a script can be used by many languages, so I'm not sure you can map a language to a direction.
Even if you could, PHP provides no way to get these informations. However you can try icanboogie/cldr to see if CLDR data would be of any use (after all most languages use only one script).
You can find here a mapping between languages and scripts and here scripts data which include direction.