added language direction support