Description
Similar to #18345. The ICU4C has uloc_getCharacterOrientation and uloc_getLineOrientation to determine this.
Currently we have isrighttoleft which only returns true or false depends on whether it's RTL or LTR in a locale.
The uloc_getCharacterOrientation method comparing to isrighttoleft returns RTL LTR or UNKNOWN constants instead of true and false. And the uloc_getLineOrientation method returns TTB(Top to Bottom) or BTT(Bottom to top) constants.
Now I think the uloc_getLineOrientation method provides something unique to the intl code base and is quite useful for people to determine the line orientation of a locale. Also I'd prefer uloc_getCharacterOrientation in more complicated senecios since it:
- returns UNKNOWN instead of false when the given locale has a undefined orientation
- returns INTL constants instead of true/false
It would be great to expose this ICU capability to PHP code. I am happy to work on this later if we agreed on this feature.
Description
Similar to #18345. The ICU4C has uloc_getCharacterOrientation and uloc_getLineOrientation to determine this.
Currently we have
isrighttoleftwhich only returns true or false depends on whether it's RTL or LTR in a locale.The
uloc_getCharacterOrientationmethod comparing toisrighttoleftreturnsRTLLTRorUNKNOWNconstants instead of true and false. And theuloc_getLineOrientationmethod returnsTTB(Top to Bottom) orBTT(Bottom to top) constants.Now I think the
uloc_getLineOrientationmethod provides something unique to the intl code base and is quite useful for people to determine the line orientation of a locale. Also I'd preferuloc_getCharacterOrientationin more complicated senecios since it:It would be great to expose this ICU capability to PHP code. I am happy to work on this later if we agreed on this feature.