This is based on character count If Arabic(or Persian and Hebrew) characters are more than Latin characters it will be RTL . Read how to use in github