Set locale based on the content item

When displaying a translated content item, we want the locale to be set accordingly. This ensures that we get the appropriate translated text in the view template and that the language direction is set correctly.