Forum Replies Created

Viewing 15 replies - 31 through 45 (of 57 total)
  • Thread Starter Aureola

    (@aureola)

    You mean replacing &hellip with […]? That doesn’t work at all (that was actually my former post to this forum, I realized that for some reason, my WP does not interpret […] correctly. Neither […].

    Edit: I see now that it looks like as if I had the […] sign, above, in the code I pasted – this must have been something interpreted by the forum… Indeed it is. When one writes the word &hellip in square brackets they are interpreted as […] by the forum. Gah!

    I see that you have changed _e( into __( also, so I’ll try to go back to replacing […] with &hellip again and see if that works.

    Thread Starter Aureola

    (@aureola)

    Bummer.
    The links stopped working! And also they have moved from the end of the excerpt to right after the title.

    I probably should paste my code in here again, maybe I have a typo somewhere:

    function excerpt_ellipse($text) {  // custom 'read more' link
       return str_replace('[…]', '<a href="'.get_permalink().'">... ' . _e('READ MORE ','ctequestrian') . '> ? </a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');

    However it did the job, sending the string to the translator. So I’m happy about that!

    Thread Starter Aureola

    (@aureola)

    Oh now the error sign went away! Thank you so much. What does the ‘. .’ actually do?

    Thread Starter Aureola

    (@aureola)

    Realloc: I am eternally grateful for all your help! I’ll let you know how it goes. Thank you so much!

    Thread Starter Aureola

    (@aureola)

    Yes I have read it, but have not been able to figure out whether or not I can use the plugin. But I guess that that’s what you are saying ??
    So, my to-do list would now be:

    1. Internationalize by “re-tagging” every hard coded piece of text into <?php _e()…. (I will check the syntax of course)
    2. Translate the texts in the PO Editor – here I will see a list of all the text I “sent” here in step 1, so I just add the translation
    3. Save the translations in a .po file in my theme folder
    4. Go to Network Admin, Plugins, and here Network Activate the MSLS plugin, and then, by some magic ;), the plugin will detect when to use what language from the .po-file. I will just have to trust that it will work somehow =)
    Correct?

    Thread Starter Aureola

    (@aureola)

    Or maybe you mean that THIS is where MSLS plugin comes in handy! ??
    ?

    Thread Starter Aureola

    (@aureola)

    See, here’s where I feel lost again. How does WordPress know which translation to use? What will I see in General > Settings?
    How can the visitor choose which language to use?

    Thread Starter Aureola

    (@aureola)

    You translate just the strings which were hard-coded in your theme

    Ahh! No that is not so much. Well, the footer contains some li, p and H1/H2 that I guess need to be “sent off” to the po-file.

    But then the multisite activation was all in vain? I guess this translation is made by the po-file “on the fly”, and it doesn’t care about my two sites or where I store the different translations template files..?

    ( I have read the article but that was an entire day ago, and since then I have been diving into child-theme problems, because I figured it was to unclear to me what to do. But now I just might give it another shot).

    Thread Starter Aureola

    (@aureola)

    I have read about this localization “thingy” but to tell you the truth; it feels like I would bite off more than I can chew. I’m very very new to php coding and have just started learning it. The problem I have, to begin with, with the __() and the _e() is that I don’t see the next step: What happens when I “send them off” with these special characters – do they end up in some kind of container waiting for me to “grab” them and put them in a .po file or something like that..?
    And for which elements would I need to do this; for every piece of text I want translated..? That will be awful lot. seems to me it is much easier and quicker to just create a child-theme that uses the same php-files with the exception of those that have english text in them – these I copy and put in the child theme’s directory and translate them to spanish.
    I would love to learn the localization stuff but I’m also running out of time cause I promised them to try to be ready by the end of the month, so I need to get this to work real soon.
    Thank you once more for your patience, although I’m just a n00b ??

    Thread Starter Aureola

    (@aureola)

    Hi Realloc,
    I think you might need to see my site so you understand what I mean:
    https://www.ct-equestrian.com/wp/wordpress/

    Look at the footer: This is footer.php:

    </div><!--end mainContent  -->
    </div><!--end container  -->
    </div> <!--end gridcontainer clearfix  -->
    <div id="bottomContainer">
    <div id="footer">
    		<section class="footer-section">
            <h1>About CT Equestrian</h1>
             <ul>
      		<li><?=date('Y')?> Copyright </li>
                 <li><a href="#"> About us </a></li>
      			<li><a href="#"> Terms of Use </a></li>
      			 <li> <a href="#"> Privacy policy </a></li>
      			</ul>
                </section>
            <section class="footer-section">
            <h1>Attend CT Equestrian</h1>
             <ul>
        		 <li>Address:<br> adress.. <br>2blabla<br> </li>
                 <li>Tel:  41201<br>ca+46 (0)70 6193639</li>
                 <li><a href="#">Contact Us</a></li>
                 <li><a href="mailto:info@ct-equestrian.com">E-mail us</a></li>
        	 </ul>
             </section>
             <section class="footer-section">
            <h1>Credits</h1>
             <ul>
        		 <li>Designed & developed by nn</li>
                 <li>nn</li>
                 <li>nn</li>
        	 </ul>
             </section>
      </div><!--End footer-->
    </div>
    <?php wp_footer(); ?>
    
    </body>
    </html>

    You see..? A lot of english language here that need to be in spanish. Or how would MSLS be able to help me with this..?
    Another problem is the “Read More” that I have in the sidebar (this is defined in functions.php.

    I have now created a child theme, where I have placed the translated footer.php, etc.. I’m still open to use MSLS but I need to understand how it works, in my case. Does it make a copy of the template files that I can “fill in” with the translated text?

    Big thanks again for helping me out! ??

    Thread Starter Aureola

    (@aureola)

    Ok so I got help from a friend instead. He told me to try with the html special character '[&hellip]' instead of '[...]' in the function and now it works! I thought I might as well write this into this thread so that others with this problem might get help too.

    Thread Starter Aureola

    (@aureola)

    Hello again,
    Never mind, I’ll just go with my old javascript instead; this was just over my head ?? Thanks anyway for your support.

    Thread Starter Aureola

    (@aureola)

    Hello again, I’m afraid I failed once more. Instead of the slideshow in the post, I see an error message “You must provide the correct slide type on the [pjc_slideshow slide_type=’your_slide_type’] shortcode”
    I have tried both the Name and the Slug between the ‘ ‘ s. What have I done wrong..? Also.. I want to add this to my theme once I have it working; so I tried to follow the guide on the homepage of the plugin, but it is only explained how you do it in the index.php-file – I would like my slideshow to only appear in the header, and only on the front page, which is a static page that uses the template file page.php. Can I just put this in my header.php?

    <div>
        <?php if(is_front-page())
      echo do_shortcode("[pjc_slideshow slide_type='CTEquestrian slideshow']"); ?>
    </div>
    Thread Starter Aureola

    (@aureola)

    I’m creating my own theme. Started from a stripped twenty-twelve, and have not added so much since then, my php-files are few, short and simple. If you need to see them I’ll be happy to show you. The entire site can be viewed at https://www.ct-equestrian.com/wp/wordpress; there you can see the problem in the sidebar, under the News title.

    Thread Starter Aureola

    (@aureola)

    Thanks iqbaljayadi, I get it now! ?? This user guide is perfect. And there is absolutely no problem with your english, the first user guide just assumed the user to know a little bit more than I did.

Viewing 15 replies - 31 through 45 (of 57 total)