You are here

function lingotek_language_matching in Lingotek Translation 6

2 calls to lingotek_language_matching()
lingotek_summary in ./lingotek.page.inc
lingotek_update_nodes in ./lingotek.sync.inc

File

./lingotek.util.inc, line 93
Utilities

Code

function lingotek_language_matching($string) {
  switch ($string) {
    case 'pt_BR':
      return "pt-br";
    case 'pt_PT':
      return "pt-pt";
    case 'zh_CN':
      return "zh-hans";
    case 'zh_TW':
      return "zh-hant";
    default:
      return preg_replace("/_.*\$/", "", $string);
  }
}