function qtranxf_slug_translate_path($path, $lang)
{
    $path = rawurlencode(urldecode($path));
    $path = str_replace('%2F', '/', $path);
    $path = str_replace('%20', ' ', $path);
    $slugs = explode('/', $path);
    //qtranxf_dbg_log('qtranxf_slug_translate_path('.$path.', '.$lang.'): $slugs: ', $slugs);
    foreach ($slugs as $k => $slug) {
        if (empty($slug)) {
            continue;
        }
        $slugs[$k] = qtranxf_slug_translate($slug, $lang);
    }
    $path = implode('/', $slugs);
    //qtranxf_dbg_log('qtranxf_slug_translate_path: $path: ', $path);
    return $path;
}
Exemple #2
0
function qtranxf_slug_translate_path($path, $lang)
{
    $slugs = qtranxf_slug_split_path($path);
    //qtranxf_dbg_log('qtranxf_slug_translate_path('.$path.', '.$lang.'): $slugs: ', $slugs);
    foreach ($slugs as $k => $slug) {
        if (empty($slug)) {
            continue;
        }
        $slugs[$k] = qtranxf_slug_translate($slug, $lang);
    }
    $path = implode('/', $slugs);
    //qtranxf_dbg_log('qtranxf_slug_translate_path: $path: ', $path);
    return $path;
}