WordPress.org

Ready to get started?Download WordPress

Forums

Bilingual Linker
Instructions? (18 posts)

  1. laptophobo
    Member
    Posted 2 years ago #

    I've just implemented my first multisite, and was promptly pointed over to the Bilingual Linker plugin. Since I'm sort of slow when it comes to working with new plugins, I'm wondering if there are any step-by-step instructions for this plugin?

    Thanks so much!

    http://wordpress.org/extend/plugins/bilingual-linker/

  2. Yannick Lefebvre
    Member
    Plugin Author

    Posted 2 years ago #

    Did you look at the instructions on the plugin's page?

    http://wordpress.org/extend/plugins/bilingual-linker/installation/

    Where are you stumbling?

  3. laptophobo
    Member
    Posted 2 years ago #

    Hi Yannick,

    All it says to do after installation is "Use the OutputBilingualLink function in the loop to display a link to the item translation." Is the code provided complete, or does it require <php wrappers. And, which template would that go into and where? Obviously, I'm not a coder and need either detailed instructions or examples.

    Thank you,

  4. Yannick Lefebvre
    Member
    Plugin Author

    Posted 2 years ago #

    I guess you are not familiar with editing theme templates. The loop refers to the processing loop found in theme templates. To see the translation link, you need to edit one or more of your theme's files to add a call to OutputBilingualLinker. Yes, it will need <php wrappers like any PHP call.

  5. laptophobo
    Member
    Posted 2 years ago #

    Yeah, that's my situation. I'm still learning where to put what in which template. I have edited one of the pages to link to it's English version. This being said, would I put it in my page.php, single.php, index.php or maybe someplace else? Will the tag look like this?:

    <?php OutputBilingualLink($post_id, $linktext, $beforelink, $afterlink); ?>

    Thanks for your time and help...

  6. laptophobo
    Member
    Posted 2 years ago #

    I have a template called "loop-single.php". In it I placed this code

    <?php OutputBilingualLink($post_id, $linktext, $beforelink, $afterlink); ?>

    in various places, but nothing happens. Is there anyone out there who has been able to make this work, and who has an example to share?

    Thanks much!

  7. Yannick Lefebvre
    Member
    Plugin Author

    Posted 2 years ago #

    The plugin will not display anything is there is no link associated with the article. Did you assign a link to the article that you are viewing?

  8. laptophobo
    Member
    Posted 2 years ago #

    I have a friend, who better understands php, work on the code with me. This is what was tried:

    <?php if ( function_exists( 'OutputBilingualLink' ) :
    )
    echo '<ul>';
    echo OutputBilingualLink('123', ' English version', '<li>', '</li>); echo OutputBilingualLink('124', ' Spanish version', '<li>', '</li>); echo '</ul>'; endif;?>
    		    <?php the_content(); ?>

    Where the "123" and "124" is where the post id is supposed to go (at least in her understanding). I think that's a mistake. How does this look to you?

  9. Yannick Lefebvre
    Member
    Plugin Author

    Posted 2 years ago #

    Well, you should not be hard-coding the post id. It should come from the current post being process. If you're in a loop, that parameter would be $post->ID.

  10. laptophobo
    Member
    Posted 2 years ago #

    For the life of me, I can't understand why you choose to be so cryptic about how to make your plugin code work. I'm not a php coder. Don't you have a working example that you can share?

  11. laptophobo
    Member
    Posted 2 years ago #

    One of the forum members supplied me with a working code. All is good now.

  12. Gnomecircle
    Member
    Posted 2 years ago #

    I have the same problem as laptophobo.

    I have been trying for hours to learn where to put what to get the code to work. Is there a simple example of what goes into "the loop"? Where I can put it? For example, can it go into the header and then when it is called, it will be available on all sites?

    I have been reading great things about this plugin in my quest for an example of how to use it. It's the only reason I am still trying... but at this point it seems that to use this plugin, I have to learn all of the code that went into creating it.

    Please help...

  13. laptophobo
    Member
    Posted 2 years ago #

    Gnomecircle. If you email me at laptophobo[at]gmail.com I'll forward you what I've learned.

  14. Gnomecircle
    Member
    Posted 2 years ago #

    Thanks laptophobo!

    I have got it working. Now I can proceed to actually creating the site. lol.

  15. laptophobo
    Member
    Posted 2 years ago #

    I get about 3 request each month for the bilingual linker code. So, here's the instructions that works on my end:

    Get plugin: This is done through the Bilingual Linker: http://wordpress.org/extend/plugins/bilingual-linker/
    • Activate this plugin with Network Activation.
    • The plugin will not show in sub site plugins. (There will be vague instructions along with a link to the author within Settings > bilingual linker. Note: you may have to delete the plugin, re-install it, and immediately click network activation.)
    • Add the following codes in the templates, such as header.php (one goes in the English, the other in the Spanish)

    (In the English template):

    <?php // Bilingual Linker for English template
    if ( function_exists( 'OutputBilingualLink' ) ) :
    echo '<ul>';
    echo OutputBilingualLink( $post->ID, 'version en espanol', '<li>', '</li>'); echo '</ul>'; endif;?>

    (In the Spanish template):

    <?php // Bilingual Linker for Spanish template
    if ( function_exists( 'OutputBilingualLink' ) ) :
    echo '<ul>';
    echo OutputBilingualLink( $post->ID, 'version in English', '<li>', '</li>'); echo '</ul>'; endif;?>

    • Create a post. Near the bottom of the page is the Bilingual Linker box. Place your alternate language link there.
    • View.

  16. selligx
    Member
    Posted 1 year ago #

    Bonjour,
    Y-a-t-il quelqu'un qui parle français sur ce forum ?
    Je souhaiterai utiliser le plugin Bilingual Linker, et je cherche des informations ou un tutoriel pour le mettre en place. Malheureusement, l'anglais et moi font "2" !
    Par avance, je vous remercie de votre aide.

  17. esmi
    Forum Moderator
    Posted 1 year ago #

    These are English language forums, so please use English. Alternatively, use a WP support forum in your language.

  18. Yannick Lefebvre
    Member
    Plugin Author

    Posted 1 year ago #

    Vous pouvez lire l'article suivant: http://dianebourque.com/2011/06/06/le-bilingual-linker-est-ma-solution-pour-les-sites-bilingues-wordpress/

    J'espere également être capable de bientôt créer des tutoriels sur l'utilisation des mes plugins les plus populaires. Si vous avez des questions particulières, contactez-moi par mon formulaire de contact sur ylefebvre.ca.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic