Support » Fixing WordPress » About changing/translating text that is shown on the homepage.

  • I would very much appreciate an answer to these (for you pros) simple questions!

    I have managed to install the Swedish language files, so that my administration panel in WordPress, is shown in Swedish.
    However, there are, as you understand, several words on my homepage that are still in English which I need to translate.

    Since I am a complete newbie please don´t assume that I have any pre knowledge as you explain this to me. Imagine explaining to a five year old monkey if you will! 🙂

    I am using notepad, and have identified that the words I need to translate are found in my theme directory in the php-files. So far so good. 🙂

    Translating a term like “blog roll” for example seems easy enough, since I use the “search all files” function in notepad, and it only finds one php-file containing the words blog roll (in a h5 heading). So I just go in to that file, and line, and replace the words “blog roll” with the Swedish spelling bloggrulle”. This is correct, right?

    However for some words it becomes a bit more tricky. For instance when I search for “Archives” my notepad finds this word in quite a few files, and lines. Now, I am not sure if I should replace ALL instances of the word (both in singular and in plural) or just try to identify the words (“archive”, “archives”) which are visible on my homepage.

    My questions here are: If I only replace “archives” with the Swedish words “Arkiv” in for instance <h3>Archives/h3> and <h2>Archives</h2> Will this not screw up some code/command lines (or whatever it might be called)? in other lines and files? Like for example: Line 5 : <?php wp_get_archives(‘type=monthly&limit=8’); ?>

    I will publish all the findings in my theme directory of the word “archive” and perhaps someone could explain to me which words to replace, and which words to leave alone, with this example:

    Line 25 : <h4 class=”pagetitle”>Author Archives</h4>
    Line 27 : <h4 class=”pagetitle”>News Archives</h4>
    [C:\Users\Wordpress\mimbopro\archives.php]
    Line 3 : Template Name: archives
    Line 16 : <h2>Archives</h2>
    Line 21 : <?php wp_get_archives(‘type=monthly’); ?>
    Line 27 : <?php wp_get_archives(‘type=yearly’); ?>
    [C:\Users\Wordpress\mimbopro\meta.php]
    Line 3 : <h5>Recent <span>Archives</span></h5>
    Line 5 : <?php wp_get_archives(‘type=monthly&limit=8’); ?>
    [C:\\Wordpress\mimbopro\sidebar.php]
    Line 28 : <!–<h3>Archives/h3>
    Line 33 : <?php get_archives(‘monthly’,”,’option’); ?>
    [C:\Users\Wordpress\mimbopro\sitemap.php]
    Line 36 : <?php wp_get_archives(‘type=monthly’); ?>

    I also wonder if foreign characters (there are three in Swedish, å,ä,ö) will mess with the code? I assume not though simce there are several themes translated into Swedish. However, they might have taken some steps I am not aware of.

    Ps. I have tried configuring poedit, but the process of localizing my theme to make it work seems way more complicated than using notepad to change the few words that need chaning.

    I would also very much appreciate some general pointers on using notepad and translating/changing hardcoded text that is visible on a wordpress homepage.

    I know there is nothing more annying than stupid newbie questions like these….still I hope someone will take mercy on me and help me out.

    Thank you so much in advance!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter vagabond72

    (@vagabond72)

    No one…?
    Can someone perhaps direct me to a place where I can get answers to these questions? 🙂

    Do not do a blanket search and replace and do not try to translate any php or WordPress code. Just replace the visible content.

    Thread Starter vagabond72

    (@vagabond72)

    Hi Iridax! Thank you for replying!

    “Just replace the visible content.” That´s the thing though…in my above example of the word “archives” it is found in many instances of the various php files in my theme directory. I don´t know which lines or which php files containing the words”archives” I am supposed to translate/replace?

    I would like some clear advice on what to look for specifically…how should I determine which words in the php documents that are actually visible on the home page?

    As a newbie I am sure I am missing something very obvious here… 🙂

    Thread Starter vagabond72

    (@vagabond72)

    At least I just tried to change the phrase “Recent stories” which I found in my index.php..and that worked like a charm! 🙂 However…that was another easy one since the phrase “recent stories” was only found on one line in one php document!

    So, again…if someone could just explain to me what to do with my “archives” example above I am sure I could use that example as a check list for all words I need to translate and then I will do just fine on my own!

    Here are examples of ARCHIVES text (as indicated by uppercase) that can be safely changed:

    <h2>ARCHIVES</h2>
    
    <h3>ARCHIVES</h3>
    
    <?php _e('ARCHIVES'); ?>
    
    <p>ARCHIVES</p>
    
    <a href="<?php bloginfo('url'); ?>/archives/" title="ARCHIVES">ARCHIVES</a>
    Thread Starter vagabond72

    (@vagabond72)

    Thank you!

    So I guess text within header tags are always safe to translate? 🙂

    I think perhaps that a php school for wordpress would be useful for me. Any good links?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘About changing/translating text that is shown on the homepage.’ is closed to new replies.