Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Locale; public class Main { public static boolean isRTL() { final int directionality = Character.getDirectionality(Locale.getDefault().getDisplayName().charAt(0)); return directionality == Character.DIRECTIONALITY_RIGHT_TO_LEFT || directionality == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC; } }