Sometimes it can be a contextual thing. In some mangas, for example, they are written vertically to indicate that what is being said was originally said in Japanese, and left to right to indicate that what is being said was originally said in another language.