Change default texts but not in the po-fil

  • KingSwiff

    #44067

    ARGH, sorry Anonymous, your guide worked PERFECT – I forgot this in your second code:

    <?php
    ?>

    Now all works GREAT and I can just take small pieces of the translation and make my own, where the rest come from the theme.

    Let me explain if somebody else can use it one day.

    Create the file functions.php and put in this code:

    <?php
    load_theme_textdomain( 'graphene', get_stylesheet_directory() . '/languages' );
    ?>

    Create the folder languages in your child theme.

    Copy the top of the original po-fil and put it into the top of your new po-file (or download the original one, make changed and make it the new one for the child theme)

    Find the text in the original po-file you want to change, it could be like this small translation:

    #@ graphene
    #: category.php:13
    #, php-format
    msgid "Category Archive: <span>%s</span>"
    msgstr "Kategori arkiv: <span>%s</span>"

    I changed it for this:

    #@ graphene
    #: category.php:13
    #, php-format
    msgid "Category Archive: <span>%s</span>"
    msgstr "Kategorien <span>%s</span>"

    When you have changed what you want to change, create a mo-file out of the po-file and upload both to your folder languages in the child theme

    Your are safe 🙂

    Kenneth, I also tried the link you send me, but couldn’t make it work – and this time I remembered <?php ?> 🙂

    Thanks again to both of you!

Viewing 11 post (of 11 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.