Check if the current language is RTL supported

I know this may sound as an easy thing to implement but i would like to know what you guys think of implementing it by default.

Some applications are written in Hebrew/Arabic which uses an RTL style for presentation. Now although i override the CLocale class to in order to add a method called isRtl which that will return true/false if the currently used locale using RTL style.

Was thinking if implementing this as a default feature will be an idea the developers will consider?

I made something like this in my custom locale class.




         /**

         *

         * @return true or false whether the current locale in used is in right-to-left form

         */

        public function getRtl()

        {

            return ( $this->_id == 'he' || $this->_id == 'ar' ) ? true : false;

        }



Thanks.

decide by yourself

I have already decided and i use it on my side. Thought something as generic as this could be implemented to the core framework.

If the ltr/rtl data is indeed available in the CLDR project (were Yii’s i18n data is coming from), you may create a ticket for it.