Helper function to get the language direction of a given element, useful for figuring out if left-to-right or right-to-left specific logic should be applied.
Element the helper will get the language direction of
Optional
Language direction to assume if one can't be determined, defaults to 'ltr'
Helper function to get the language direction of a given element, useful for figuring out if left-to-right or right-to-left specific logic should be applied.