Support » Fixing WordPress » How to easily translate frontend language strings?

  • I did some searching online.

    I would like to find an easy to to translate frontend language strings from English to Norwegian. Easy is the keyword here.

    Using the Norwegian WordPress language files the backend becomes Norwegian but I did not notice any difference in the theme on the frontend that I am using.

    I also just want to replace words as Search, reply to etc.
    I am working on finding a simple solution to replacing the text strings on the frontend.

    Got any ideas?
    Are developers for WordPress Core making it easier for the developer to change text strings to other languages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator keesiemeijer



    It depends if your theme is translation ready.

    To translate plugins and themes I use this plugin:
    It can scan WordPress/plugin/theme for all translatable strings and create the po and .mo translation files.


    First up, is the theme translatable? The theme would need to be ready, or you need to get your hands dirty (very dirty) setting that up.
    As I’m not sure what you’ve read.. here’s a start

    Essentially, translating the back and front ends are 2 different processes

    Take a look at the links at the bottom of that codex entry to start getting into the theme end of things

    This is how I understand it.

    First switch to the language file name in wp-config:
    Replace define(‘WPLANG’, ”); with (example here is Norwegian) -> define(‘WPLANG’, ‘nb_NO’);

    Dashboard > Updates and then run the language file.

    The backend changed to Norwegian. The frontend stayed the same (checked the Leave a Reply)…. I thought it would change when changing languages…?
    I found the theme I use on the localization page clicked to edit the theme and added some Norwegian words to the most common English words. Leave a reply was changed among other words. Clicked generate Mo file. Went to the frontend and refreshed the page. No change.

    I installed the plugin Codestyling Localization. The Pot and Mo areas for Norwegian are both in green.

    What am I doing wrong?

    Moderator keesiemeijer



    I installed the plugin Codestyling Localization. The Pot and Mo areas for Norwegian are both in green.

    Check if the language files are in your theme folder by using FTP or whatever file management application your host provides.

    Maybe your theme doesn’t load the text domain correctly:

    Try looking for load_theme_textdomain() in your theme’s functions.php

    I noticed the Po and Mo files had a wrong file name so I readjusted to the correct name and the front end changed.

    My frontend and backend are now in Norwegian. Since I wanted to change the backend to English I installed Bogo
    It will easily switch the backend to English. Bogo can also make translation pages. So I created an English page along with the Norwegian.

    The question that comes up is:
    Switching between multiple frontend language pages will it reflect with the theme text strings? Meaning having Norwegian on the Frontend the theme text strings (the ones I translated) have then changed to Norwegian. BUT switching language is there a way to have the theme language switch back again to English?

    Thank you for all your comments!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to easily translate frontend language strings?’ is closed to new replies.