Set global variable 'dir' with a default value of 'ltr'