Bold Headline now available in French and Polish

I received a request from a fan of my Bold Headline theme earlier this month which led me down an interesting rabbit hole. This fan, Dariusz, wanted to use my theme but would like a Polish version of it. Not knowing any Polish myself, I asked if he could provide the translation, which of course then led to his next question, how do I do that?

Since I use underscores as the base of all my theme work, I knew that the theme was internationalized, but I didn’t really know what that meant. In order for a theme to be used in another language, one must wrap all english content in the _e function.

<?php _e( 'Some text to translate and display.', 'textdomain' ); ?>

Underscores already does all that, so I didn’t need to worry, but now what?

Turns out translating a theme is quite easy.

First, you need to add a language folder to your theme directory. Then all you have to do is create a .po and .mo file. I found that the Codestyling Localization plugin worked really well for me. There are other tools you can use and lots of info about this on the codex. Using this plugin, I created a French version simply by going through the whole theme and translating all of the English. Dariusz did the same for the Polish version and I added his files to my theme.

To use the theme in either of these language, all you need to do is make an edit to your wp_config.php file. If you look at line #62 or there abouts, you’ll find this:

/**
 * WordPress Localized Language, defaults to English.
 *
 * Change this to localize WordPress. A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
 * language support.
 */
define('WPLANG', '');

The comments left by the WordPress Dev team are always super useful!

I hope that these translations are useful. If you would like to see the theme translated in other languages, I would love to add them.

2 comments:

  1. Christine! I really, really like Bold Headline(s) (I’ve seen it both ways!). I just applied it to my blog (above) less than 24 hours ago, and the more I work with it, the more I like it. I’m a veteran copywriter/creative director > content creator with just enough graphic designer left in my blood to recognize how much sensitivity you’ve put into the typography. I’ve subscribed to your newsletter, am going to follow your blog, and hope to see what else you or others do with the theme so I can take full advantage of it.

    This may be a complete impossibility when designing themes, but I’ve always hoped I might eventually find a way to add drop caps at the beginning of a post. Bold Headline seems to me to be a design this could really work on. Is that possible to do?

    – Jim

  2. I like the idea of adding drop caps to the theme. I don’t think that I can add it to bold headline, since that change may not please everyone, but I think that this could be a good idea for a child theme. I think I could do this rather quickly for you.
    I’ll try to put some time aside for this later this week or early next week and I’ll get back to you.

Comments are Closed.