You are here

private function CurrentLanguage::fullcalendar_view_map_langcodes in Fullcalendar View 8.3

Map Drupal language codes to those used by FullCalendar.

Parameters

string $langcode: Drupal language code.

Return value

string Returns the mapped langcode.

1 call to CurrentLanguage::fullcalendar_view_map_langcodes()
CurrentLanguage::process in src/Plugin/FullcalendarViewProcessor/CurrentLanguage.php
Process the view variable array.

File

src/Plugin/FullcalendarViewProcessor/CurrentLanguage.php, line 101

Class

CurrentLanguage
Current language plugin.

Namespace

Drupal\fullcalendar_view\Plugin\FullcalendarViewProcessor

Code

private function fullcalendar_view_map_langcodes($langcode) {
  switch ($langcode) {
    case "en-x-simple":
      return "en";
    case "pt-pt":
      return "pt";
    case "zh-hans":
      return "zh-cn";
    case "zh-hant":
      return "zh-tw";
    default:
      return $langcode;
  }
}