public function viewElements(FieldItemListInterface $items, $langcode) {
$elements = [];
$installed_languages = \Drupal::languageManager()
->getLanguages();
foreach ($items as $delta => $item) {
$from = $installed_languages[$item->language_from]
->getName();
$to = $installed_languages[$item->language_to]
->getName();
$elements[$delta]['#markup'] = t('From @from to @to', [
'@from' => $from,
'@to' => $to,
]);
}
return $elements;
}