public function useDefaultLanguage($text)
 {
     if (function_exists('qtranxf_useDefaultLanguage')) {
         return qtranxf_useDefaultLanguage($text);
     } else {
         return qtrans_useDefaultLanguage($text);
     }
 }
Exemplo n.º 2
0
function qtranxf_useRawTitle($title, $raw_title = '', $context = 'save')
{
    if ($raw_title == '') {
        $raw_title = $title;
    }
    if ('save' == $context) {
        $raw_title = qtranxf_useDefaultLanguage($raw_title);
        $title = remove_accents($raw_title);
    }
    return $title;
}
Exemplo n.º 3
0
function qtranxf_useRawTitle($title, $raw_title = '', $context = 'save')
{
    switch ($context) {
        case 'save':
            if (empty($raw_title)) {
                $raw_title = $title;
            }
            $raw_title = qtranxf_useDefaultLanguage($raw_title);
            $title = remove_accents($raw_title);
            break;
        default:
            break;
    }
    return $title;
}
 function qtrans_useDefaultLanguage($content)
 {
     return qtranxf_useDefaultLanguage($content);
 }
function wppa_get_album_name_for_pl($id, $name = false)
{
    // If a raw name is given, use it
    if ($name) {
        $result = $name;
    } else {
        $result = wppa_get_album_item($id, 'name');
    }
    // Filter the name for use in permalinks
    $result = str_replace(' ', '-', $result);
    $result = wppa_sanitize_file_name($result);
    $result = str_replace(array('"', "'"), '', $result);
    // Translate it into default language if qTranslate is installed
    if (function_exists('qtranxf_useDefaultLanguage')) {
        $result = qtranxf_useDefaultLanguage($result);
    }
    // Done
    return $result;
}