One of the new features in WPML 1.4.1 will be language fallback for blog posts. This means, your translated blog can show either:
- Only posts that have translation.
- All posts – if there’s translation, show it, otherwise, show the post in the default language.
Our site includes pages and posts. We’re translating almost all pages, but very few posts. Now, when folks sign up to our German feed (for example), they’ll get our news in German, if they’re available and otherwise, in English.
This new feature applies only to blog posts and RSS feeds. There’s no language fallback for pages and we’re not planning to add it (for reasons such as site navigation integrity, parent/son relationships, etc.).
Want to try this new version?
Not so fast. This new version is tested very basically and has some work-in-progress functionality.
By any means, don’t install it on any live site. It’s just for testing on local test sites.
OK? No live sites please. So, here’s the download link – sitepress-multilingual-cms1.4.1.dev-2.zip
Like any time you update a plugin manually, remember to deactivate and activate it again after you install the new version.
To enable this feature, go to WPML->Languages. It’s under More options (available only in Advanced mode).
Creating a test version of your site
This is a bit unrelated to this particular version, but I think it’s going to be useful to read anyway.
It’s always a good idea to have a local version of your complete site and test things on it. This is how we create local test versions for our sites:
- Install Apache, PHP and MySQL. If you’re on Linux or Mac, it’s already there. For Windows, you can use XAMPP.
- Create a local domain by editing your hosts file. On Linux it’s /etc/hosts. On Windows – C:\Windows\System32\drivers\etc\hosts.
- Create a MySQL database and install WordPress locally.
- Copy the entire wp-contents directory from your online site to your local test site (use ZIP to finish this before Christmas).
- Do a database dump of your live site. You can do that using phpmyadmin or using mysqldump from an SSH command line.
- Download the dump and edit it. Replace all places where your online domain appears with the local domain. There should be thousands of places to replace.
- Import the database dump to your database. It’s easiest using a command line: mysql -u USER -pPASSWORD DB_NAME < DB_DUMP_FILE
Everything should look the same on your local test site, except you’re browsing your site locally from backup. It runs faster and can’t cause any damage.
Install whatever it is you’re testing in the local site and check it. If everything running smooth you can also install on the live site. Problems? No harm done, you’ve only messed the test site and you can import the database and try again.
Of course, this setup only needs to be done once. It’s a good idea to keep that local test site handy for the next time you’re trying something new.
Having said this, even if this current version of WPML runs flawlessly on your test site, please don’t install it on any live site. We’re going to add some migration logic to it and it will be very difficult to apply if you update now.
Let us know what you think
Like the new blog language fallback? Any problems, suggestions or ideas? Leave a comment here.
And, have a good weekend! I’m off, for my.