Well, as I noted some time ago, I am blogging in english and german from time to time.
Still using BasicBilingual plugin for WordPress I’ve hardly thought about what I can do with ‘the-other-excerpt’ until now.
I am now working on a plugin that displays an individual link per post, whether the ‘other-language’ is set or not. When the link is clicked it replaces the original content of the post with the other language excerpt.
Before you start
- Get the BasicBilingual plugin for WordPress.
- Make sure you have checked Ozh’s solution for language switching.
His method uses a JavaScript that hidesdivs with alang-tag using a single link and cookies to save the selected language.
This is probably better suited for you if you translate every post in your blog into another language. - There are some values to be customised in the plugin code, so basic programming knowledge is recommended.
The plugins’ code is well documented so you should be able to handle the required minor changes.
I will try to improve its ease of installation and setup with further versions and maybe even your help. Just drop a comment for suggestions.
Notes & Thoughts
I also need your help, advice, critique or recommendation on some issues and questions that came up to improve language switching.
If you need help or advice you can of course leave a comment as well.
- Would it be better to display an icon of the language the current post is written in or an icon of the other language the article is available in (like it is now) ?
- Is it good to replace the whole article content with the new language or would an appendix be better? It might be an accessibility issue that the reader loses attention on the post because it’ll change it’s visuals except the post title. Linking to the specific post-ID with the switching-link was an approach to solve usability issues.
- Is it a waste of bandwith if the other-excerpt is included permanently in the HTML but hidden until the user decides to display it? A thing I thought of was an external PHP-script that aquires the other-excerpt on demand and passes it to the WordPress-Page (might be an application using AJAX)
Posted in Developing, Wordpress, Tags:bilingual, dom, javascript, multilanguage, php, plugin, switch, Wordpress
Possibly Related Entries
9 Responses to “Language switching for Basic Bilingual”
Who's linking?
Who is this?
freshlabs journal is the bi-lingual weblog and digital playground of Tim Isenheim, designer and webdeveloper from Hamburg, Germany. More →





Just a note : my solution for a bilingual blog is not a plugin and is not based on Basic Bilingual (in fact it’s been done months before this plugin)
It’s a 100% client side solution, using javascript and CSS only.
Funny that you link to Ozh’s blog… Ozh’s quake website, frenchfragfactory, is THE centerpoint for anything quake in france so obviously it’s in my bookmarks toolbar ;)
I am using a plugin called “polyglot”, you can define as many languages as you like, only the one selected by the user will be transfered. I like it a lot, eventhough I still hope for native multi-language support in further WP releases…
BTW: which plugin are you using for the comment preview?
dicken Reh-Speck dafür und ein großes danke. danach hab ich (nicht wirklich) gesucht, naja, jedenfalls schwebte mir soetwas schon länger vor…
danke fürs zugänglich machen! btw: das theme ist auch dufte!
Haven’t tried the scripts yet, but I was wondering: Have you thought something for the comments too? If comments on a post are written in different languages, seeing them being mixed can cause confusion. E.g. check the comments above :-p
Steven, that’s a good idea though it requires some sort of extra option field in the comments area where the user can choose his language. Or it means implementing a domain check on the E-Mail address for de and com, .co.uk. I’ll figure that out.
A new theme is in work too, so I’m putting this somewhere between my to-do list.
Hi,
I’m currently setting up a WordPress K2-based blog.
I hardly find good tutorials explaining how to implement multilanguages support.
What plugin do you use for your site ? Polyglot or Language switching ?
Could you explain the minimal steps to follow once the plugin is activated ?
Thanks you so much in advance !
Mike.
As you might guess from the title of the article you just commented on, I’m using Basic Bilingual to make bilingual posting possible.
The switching part is my own development, downloadable in an earlier version in this article, too (Including a mini-documentation on how to set it up).
Already implemented in my blog is a newer version of my Language Switcher which uses PHP to make the switching more accessible. If JavaScript is active, the switch link is replaced with a JS function call that uses Ajax to request the other language text.
But the Ajax switcher still needs some testing, so I might release it within the next weeks. You might want to keep an eye on that!