public static function Lingotek::availableLanguageTargets in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.3 lib/Drupal/lingotek/Lingotek.php \Lingotek::availableLanguageTargets()
- 7.4 lib/Drupal/lingotek/Lingotek.php \Lingotek::availableLanguageTargets()
Gets the site's available target languages for Lingotek translation.
Return value
array An array of Lingotek language codes.
1 call to Lingotek::availableLanguageTargets()
- LingotekApi::getCommentCreateWithTargetsParams in lib/
Drupal/ lingotek/ LingotekApi.php - Gets the comment-specific parameters for use in a createContentDocumentWithTargets API call.
File
- lib/
Drupal/ lingotek/ Lingotek.php, line 349 - Defines Lingotek.
Class
- Lingotek
- A utility class for Lingotek translation.
Code
public static function availableLanguageTargets() {
$languages = array();
foreach (language_list() as $target_language) {
if ($target_language->enabled && lingotek_supported_language($target_language->language)) {
$languages[] = self::getLingotekLanguage($target_language->language);
}
}
return $languages;
}