We're about to start localizing a wordpress installation with a highly customized theme and several custom plugins. Unfortunately it is not gettext-ready, and also the original theme is not in English.

How would you do this? I'm thinking the best way to do it would be to go through the theme and plugin files, change all static text (currently in Swedish) to gettext-wrapped English, and then do a translation back to Swedish. It sound pretty tedious.

Can we just wrap the Swedish in gettext calls and provide an en_US translation?

Also, any thoughts on tools? WPML, Codestyling Localization, raw poedit, something else?

1 Answer 1


create a language file with the i18n string en_US, also the same procedure how with other languages, if the original is english. WordPress set the language key to en_US, if the key is empty in the wp-config.php. Use the plugin Codestyling Localization for easy create the language files inside your WordPress Install.

  • Right... but the original is NOT English. Do you think we should translate the strings in the php to English and then translate it to Swedish using gettext? Or can we leave it as Swedish in the php and just translate it to English using gettext?
    – PapaFreud
    Aug 23, 2011 at 8:11
  • yes, you can leave the swedish in the php file and translate to all other languages. Important is the key on the language file, thats all.
    – bueltge
    Aug 23, 2011 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.