Language Switcher WordPress Plugin
This is the fifth page describing the Language Switcher plugin for WordPress. If you didn't start on the first page, you might want to go back and start there.
Also... As of April 2010, this plugin is no longer being maintained. Please see note on the top of the plugin home page.
At the bottom of this page, you will find downloads for the Language Switcher plugin. The downloads below fall into two categories:
- Plugin zip file
- The plugin package itself. Check the installation section to find out how to install it.
- WordPress fixes zip files
- WordPress is not really set up to be multi-lingual, which is why there is a need for this plugin. Your faithful plugin author, Jennifer Hodgdon, spent a lot of time to get some changes into the core WordPress code so that the plugin could help you translate all of your content, categories, titles, tags, etc. So, since WordPress 2.1.2, WordPress has been mostly compatible with the Language Switcher plugin. However, there have been a few incompatibilites with several versions, so if you want your multilingual or bilingual bilingual blog to work entirely, including posts, categories, links, link categories, RSS feeds, etc., and if you want the WordPress admin pages to display correctly, you may need to modify a few files in your WordPress installation (see the installation section).
- Your best bet is first to upgrade to the latest version of WordPress, if you are not already running that version (later versions tend to be more compatible than earlier versions.) Then check below to see if there is a zip file for your version of WordPress, and install the fixes. You can find out what version of WordPress you are using by looking at the bottom of your admin panel, if you already have WordPress installed. If you don't have WordPress installed yet, the file called "version.php" in the "wp-includes" directory has a line that tells you the version number. The "README" file in each zip file below explains where to put the enclosed files.
Notes on WordPress version compatibility
- WordPress 2.9: As of WordPress 2.9 Beta 1, it looks like no fixes are needed for the Language Switcher in WordPress 2.9, but you will need to update to Language Switcher 1.21 if you are using a tag cloud sorted by name and you want the sorting to work for all languages. Some users may also need extra space for their category and tag names (for instance, blogs with many languages, or using a multi-byte language such as Chinese or Japanese); if that is the case, you can follow the database schema fix instructions.
- WordPress 2.8.x: No fixes are needed for the Language Switcher in WordPress 2.8, 2.8.1, etc.. Some users may need extra space for their category and tag names (for instance, blogs with many languages, or using a multi-byte language such as Chinese or Japanese); if that is the case, you can follow the database schema fix instructions.
- WordPress 2.7.1: A fix file is needed (download below) to fix category/tag sorting issues. Some users may also need extra space for their category and tag names (for instance, blogs with many languages, or using a multi-byte language such as Chinese or Japanese); if that is the case, you can follow the database schema fix instructions.
- WordPress 2.7: A fix file is needed (download below) to fix an issue with RSS feed URLs and category/tag sorting issues. Some users may also need extra space for their category and tag names (for instance, blogs with many languages, or using a multi-byte language such as Chinese or Japanese); if that is the case, you can follow the database schema fix instructions.
- WordPress 2.6.1: No fix file is needed. Some users may need extra space for their category and tag names (for instance, blogs with many languages, or using a multi-byte language such as Chinese or Japanese); if that is the case, you can follow the database schema fix instructions.
- WordPress 2.6: A fix file is needed (download below) to fix several issues. Most users will also need extra space for their category and tag names; follow the database schema fix instructions.
- If you are using an older version of WordPress, you should upgrade to the latest version instead. If for some reason you cannot, and want to get the WordPress fixes for your version of WordPress, please contact the plugin author. There are files available back to WordPress 2.1.2.
Pre-Install Fix for Database Schema File
For WordPress versions 2.3 to 2.6, you will probably want to make the database field that holds category and tag names wider, so that it has room for multi-lingual categories and tags. Even for version 2.6.1 or later versions of WordPress, you may still want to make the field wider if you are using multiple languages, long category or tag names, or a language like Chinese or Japanese that uses two-byte characters. It is best to make this edit before running the install or upgrade script in your new/upgraded WordPress installation. Otherwise, you will need to follow the instructions below for manually fixing your database. Here are the steps for pre-script:
- Find a file called "schema.php" in the "includes" sub-directory of the "wp-admin" directory of your WordPress installation.
- Open this file in a plain-text editor (such as Notepad on Windows).
- Down about 10 lines, find a line that creates the "terms" table.
It should look something like this:
$wp_queries="CREATE TABLE $wpdb->terms ( ..."
- A few rows below that, find the line that creates the
"name" field in this table. It should look something like
this:
name varchar(55) NOT NULL default '',
- Change the 55 to 200 (or even a larger number if you are using lots of different languages in your blog, and find you are running out of space for storing category and tag names).
- Save the file, and if you have already uploaded your WordPress files, upload this file to your server.
Post-Install Manual Database Field Change
If you did not follow the instructions immediately above to change the database schema file before you installed WordPress, and you need to make your categories field bigger, you can follow the directions in this section to fix your database so that it has more space for categories.
Also, if you are upgrading from a previous version of WordPress, already had an existing Language Switcher installation, and did not fix the schema file for your new version before running upgrade.php, you may find that your categories from before will get truncated back to the WordPress default of 55 characters, and very likely your entire blog will fail to display correctly until you go back, follow the directions in this section to fix the field width manually, and then edit all the categories (which you may need to do in the database manually too).
To fix your category name field manually, start by logging into your web host's PHPMyAdmin page. In PHPMyAdmin, you will need to:
- Navigate to the WordPress database you set up during WordPress installation (it may be selected by default).
- Navigate to the "Structure" tab of the "categories" table, which may have a prefix on its name (like "wp_categories"). If you are using WordPress 2.3 or a later version, the table is called "terms" instead of "categories".
- Click on the "change" icon or link in the "cat_name" field row (the icon is a pencil in the version of PHPMyAdmin my web host uses). In WordPress 2.3 and later, the field is called "name".
- Increase the Length property; I suggest using 200 characters.
- Save your change.
- If this is an upgrade from a previous multi-lingual blog installation, you may also need to edit your categories in the database. Just click on the Browse tab in your categories (or terms) table, find a row that needs editing, click on the "change" icon (the pencil), and edit the category (or term) name field back to what it should be.
