• Resolved Olly – OWMC

    (@olly-owmc)


    Built a mutlisite last year and got it working beautifully with Bilingual Linker using this code:

    echo OutputBilingualLink( $post->ID, '<div class="english"></div>', '<div class="flag" title="English">', '</div>');

    It’s come to reworking the site and I found my links had vanished. Discovered it was a fatal error – undefined function “OutputBilingualLink”.

    I’ve been digging around in the forums for 2 hours now and it seems that “echo OutputBilingualLink” has been replaced with “the_bilingual_link”. (note missing “echo”).

    So I’ve tried using “the_bilingual_link”, however this now messes with what i had in the parentheses ($post->ID, ‘<div class=”english”></div>’, ‘<div class=”flag” title=”English”>’, ‘</div>’).

    What happened? Plugins shouldn’t just break like this without a strong warning from the author on update.

    Also, if OutputBilingualLink is truly not valid anymore, why is it still on the installation instructions?

    EDIT – OK I see whats going on. The plugin has improved I think. But this has completely messed up my site. I’m going to have to put some time into rewriting my markup and css. It would be at least a bit helpful if the link inserted by “the_bilingual_link” could have a class assigned to it.

    There is literally nothing in google about this at all.

    https://www.ads-software.com/plugins/bilingual-linker/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Olly – OWMC

    (@olly-owmc)

    OK, sorted.

    My problem was not entering the language ID.

    I can’t remember but I think when i first installed this plugin over a year ago, it was only capable of handling 2 languages (?).

    So basically, where before I had:

    echo OutputBilingualLink( $post->ID, '<div class="francais"></div>', '<div class="flag" title="Francais">', '</div>');

    Now I have:

    the_bilingual_link(1, $post->ID, '<div class="francais"></div>', '<div class="flag" title="Francais">', '</div>' );

    The new syntax provides many more arguments as listed on the plugin’s settings page. Though it would have been nice to find them on the web somewhere (especially on the plugin’s Installation page on the WP plugins site which is currently out of date).

    the_bilingual_link($language_id, $post_id, $link_text, $before_link, $after_link, $default_url, $echo, $href_lang_code, $hide_single, $hide_front_page, $hide_search_page, $hide_archive_pages, $hide_category_pages);

    So this is actually much cooler!

    Apologise for my distress, this is a great plugin and the updates are actually excellent.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Sorry for the trouble with the changes. Indeed, I added many more parameters to the new function and gave it a name more similar to other WordPress functions used in the template to make it easier for some people to learn. I kept the old function for some time, but it became difficult to maintain so I eventually dropped it.

    Yes, the plugin only supported 2 languages before, now supports more.

    Also, plugin recently added ability to add Bilingual Linker item to menu through WordPress menu builder, which makes it much easier for new users to get on-board.

    Please consider rating or donating to support the ongoing development of this plugin.

    Link between pages for Bilingual Linker

    I have successful setup multisites for English and Bahasa (www.fmch-indonesia.org and https://www.bahasa.fmch-indonesia.org), installed Bilingual Linker and can see link box on page.

    I am having real trouble working out how to add link.

    I have tried
    – instructions on plugin page
    – instructions in forum

    I am using ifeatures pro5 theme and have tried adding code to header.php file for each site.

    I would really appreciate some help in how to do this.

    Many thanks

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    If you are having trouble putting the bilingual linker code in the right place, try using the new menu builder item to add it directly to your menu.

    Just go to the Menus section under Appearance, and drag-and-drop the Bilingual Linker menu item to your menu and save.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘OutputBilingualLink not working anymore’ is closed to new replies.