public static function LingotekLocale::testConvertFunctions in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8 src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 8.2 src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.0.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.1.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.2.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.3.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.4.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.5.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.6.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.7.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
- 3.8.x src/LingotekLocale.php \Drupal\lingotek\LingotekLocale::testConvertFunctions()
File
- src/
LingotekLocale.php, line 308
Class
- LingotekLocale
- A utility class for Lingotek translation.
Namespace
Drupal\lingotekCode
public static function testConvertFunctions() {
$result = [
"drupal => lingotek" => [],
"lingotek => drupal" => [],
];
// drupal => lingotek
foreach (self::$language_map as $drupal_language_code => $lingotek_locale) {
$ret_lingotek_locale = self::convertDrupal2Lingotek($drupal_language_code);
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);
if (strcmp($drupal_language_code, $ret_drupal_language_code) !== 0) {
$result["lingotek => drupal"][] = "[{$lingotek_locale} => {$ret_drupal_language_code}] !== {$drupal_language_code}";
}
}
return $result;
}