public static function Lingotek::testConvertFunctions in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/Lingotek.php \Lingotek::testConvertFunctions()
- 7.3 lib/Drupal/lingotek/Lingotek.php \Lingotek::testConvertFunctions()
- 7.4 lib/Drupal/lingotek/Lingotek.php \Lingotek::testConvertFunctions()
- 7.5 lib/Drupal/lingotek/Lingotek.php \Lingotek::testConvertFunctions()
- 7.6 lib/Drupal/lingotek/Lingotek.php \Lingotek::testConvertFunctions()
File
- lib/
Drupal/ lingotek/ Lingotek.php, line 320 - Defines Lingotek.
Class
- Lingotek
- A utility class for Lingotek translation.
Code
public static function testConvertFunctions() {
$result = array(
"drupal => lingotek" => array(),
"lingotek => drupal" => array(),
);
// drupal => lingotek
foreach (self::$language_map as $drupal_language_code => $lingotek_locale) {
$ret_lingotek_locale = self::convertDrupal2Lingotek($drupal_language_code, FALSE);
if (strcmp($lingotek_locale, $ret_lingotek_locale) !== 0) {
$result["drupal => lingotek"][] = "[{$drupal_language_code} => {$ret_lingotek_locale}] !== {$lingotek_locale}";
}
}
// lingotek => drupal
foreach (self::$language_map as $drupal_language_code => $lingotek_locale) {
$ret_drupal_language_code = self::convertLingotek2Drupal($lingotek_locale, FALSE);
if (strcmp($drupal_language_code, $ret_drupal_language_code) !== 0) {
$result["lingotek => drupal"][] = "[{$lingotek_locale} => {$ret_drupal_language_code}] !== {$drupal_language_code}";
}
}
return $result;
}