Bogo – Best (and Underrated) Multi Language Plugin

Bogo is solid, reliable and conflict-free multilingual plugin. It duplicates your post and uses URL Rewrite to serve the correct translation.

Whenever I like a plugin, I usually check out other plugins that are made by the same developer.

From that, I found a hidden gem called Bogo, a multilingual plugin made by Contact Form 7‘s developer.

How it Works

Instead of using custom database tables (like other competing plugins), it duplicates the Page and assigns the same URL slug. It’s normally not allowed by WordPress, but the plugin overrides that restriction.

Then visitors can choose the language by clicking the switcher created by the shortcode [bogo].

Now your site will serve the post with the chosen language. Additionally, your Blog Index page will only list translated posts.

Language Switcher created by the shortcode [bogo]

Setup Process

  1. Download and install Bogo. Go to the new “Languages” tab and choose the supported languages.
Activate supported language
  1. Edit an existing post or page. You will find a new section in the sidebar to add a translation. Click the button to duplicate the post or page.
Click the annotated button to add translation
  1. Lastly, edit the duplicated post or page and manually translate the text. Do not change the URL slug since it can break the language switcher.
Manually translate the post and publish it.

Dropdown Language Switcher

There is no filter or action that allow us to edit the markup. So we need to create our own.

In the example below, we will create a shortcode named [bogo-dropdown]. You need to replace the [bogo] shortcode with this.

add_shortcode( 'bogo-dropdown', 'my_bogo_shortcode' );

function my_bogo_shortcode( $atts ) {
  if( !function_exists( 'bogo_language_switcher_links' ) ) { return; }

  $links = bogo_language_switcher_links( $args );
  $count = 0;
  $output = "<select onchange='this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);' >";

  foreach( $links as $link ) {
    // abort if empty href
    if(empty( $link['href'] )) { continue; }

    $extra = '';
    if ( get_locale() === $link['locale'] ) {
      $extra = 'selected disabled';
    }
    
    $output .= "<option value='{$link['href']}' {$extra}> {$link['title']} </option>";
    $count++;
  }

  $output .= "</select>";

  // if only 1 language, output nothing
  if( $count <= 1 ) {
    return '';
  }

  return $output;
}

Conclusion

Bogo has been my go-to multilingual plugin for years. It is solid, reliable and conflict-free.

It doesn’t try to do fancy stuff like creating a custom Database table. Everything is just a plain post and URL rewrite.

Even if you deactivate the plugin, your translated posts and pages are still there. Although it’s not visible via front-end.

Feel free to ask any question regarding Bogo in the comment below 🙂

Default image
Henner Setyono
A web developer who mainly build custom theme for WordPress since 2013. Young enough to never had to deal with using Table as layout.
Leave a Reply

2 Comments

  1. thanks for the description of Bogo. i was just wondering if its possible to show the languages in a dropdown menu on the page (as many countries have more than two languages)? It doesn't look nice having 6 languages in a big box at the front page...