• Dear all,

    I would like to swicth the menu translation on language changed.
    How can I do that?
    I’m looking inside nav-menu-template.php and wp_nav_menu function for a way to change the single item with something like Multilingual_Text::Title(); but for now I haven’t found a solition, do you have any suggestions?
    Thanks in advance for your reply,

    Milena

    http://wordpress.org/extend/plugins/multilingual-text/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same problem … I’m still looking, I think we fit a function in the php file of the plugin. It should look like the function that replaces the headlines, but the wp_nav_menu function generates a more complex code. I will keep you informed!

    Thread Starter mdonato

    (@mdonato)

    Hi, in the meantime I have found a solution:

    1. Add this method in the plugin code: multilingual-text.php:

    static function PostTitle($postTitle)
    {
    	self::$title_multilingual = true;
    	if ( strlen($postTitle) == 0 ) return;
    	return $postTitle;;
    	//self::$title_multilingual = false;
    }

    2. Edit wp-includes\post-template.php -> function start_el(…) change this row from:

    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';

    to:

    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . $link_before . apply_filters( 'the_title', Multilingual_Text::PostTitle($page->post_title), $page->ID ) . $link_after . '</a>';

    And the problem is solved.
    If someone has found a better solution, please let me know.

    Bye

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Multilingual Text] wp_nav_menu doesn't change with multilingual plugin’ is closed to new replies.