Though ideally if we use the views correctly and override them well, Drupal Views itself take care of getting the translated version as per configurations of the view. For details check this: EntityField::getValue
Twig
Most of us know, the ideal way of making a variable available in a specific twig file is to use hook_preprocess_HOOK. But what if we have a requirement that we need a kind of global variable that should be accessible in any twig file. So, that we are able to use it wherever we want to, without additional pain.
The best part of Drupal is, everything is possible. But at the same time, there is a trick, you always have more than one way of doing things. And now it's in your hands to pick up the best suitable performant way for your solution.
Tags
I was working on issue queue of views extras module and came across a requirement: Add twig support: https://www.drupal.org/project/views_extras/issues/2948514. For a moment I was helpless, I mean I always had the requirement to use PHP function in twig but never thought in the reverse direction and to resolve that issue I need to know how we can support twig variables in PHP.