If you are working on developing themes for WordPress (which is actually a pretty good way to get free backlinks to your own personal blog), you should consider making your WordPress translation-ready. It will take you less than 1 minute and will certainly increase your theme reach because not everyone speaks and blogs in English.
The very first step is to create a folder called languages in your theme folder.
In a second time, edit the functions.php file of your WordPress theme and paste the following code in it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// Make theme available for translation
// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'your-theme', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable($locale_file) )
require_once($locale_file);Your theme is now ready to be translated!


I don’t know if this is something I should do, as I’m not completely sure how many people would actually need my blog to be in another language. How do you know if this would be right for your blog?
Let’s put it this way: Do you have a reason not to do it? Always better to be safe than sorry.
You have a point there. :)
What languages does this include?
It doesn’t “include” languages, it just lets anyone who comes to your page be able to translate it into their native language.
I think this is a great idea. There are so many great writers and great blogs around the world, why would you want to be limited? There are examples of bloggers out there that have become renown, like Mashable, which is an internet news blog started by Scot Peter Cashmore in 2005, and is now one of the top websites in the world. It’s called the World Wide Web for a reason, people!
I love Mashable!
It’s things like this that make technology beautiful. Transcending borders, oceans, languages, it’s the ultimate connection. No boundaries.
Wow, I had never even considered doing this, that’s great!
Did you know that most of the time people will take your blog more seriously if it’s on your own website, rather than WordPress or any of those blog-ready sites? If you have a blog that’s http://www.thisismyblog.com for example, that is seen a much more credible. Fun fact!
Oh wow, that actually created a link to a real person’s blog, my bad. I meant it as an example blog title, but you get the idea. Personalized blog pages are more credible than ready-made.
Oops! :)
Wow, I always thought that sites like WordPress would just have translation capabilities built in!
You would think. But no, a lot of times you have to do things by hand on these sites.
Boa noite from Brazil!
Please, I need to ask – which I think – can be a very dummy question; then, since now: sorry about that! :) I’m in the very start of WP studies, so…
XHTML + CSS sites may use just a link (to Google translator, for instance, regardless quality issues) and anyone who comes to this page will be able to translate it into their native language.
So, what is this about, here, with WP? I mean: why does WP need these codes?
Will these special lines translate something that usual translators would not be able to? What, exactly?
Thanks for your attention and sorry about my english mistakes!