Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

If you Like the Asteria Lite Theme and want to Keep it free forever Please Rate it on Wordpress.org (It only takes a few seconds)
Viewing 10 posts - 26 through 35 (of 35 total)

Home page and options translation

Home Forums Free Theme Support Asteria Lite Home page and options translation

  • #115245

    Preksha

    I am using polylang plugin and home page is not translated with different languages. How to change home page with different language select from wp_nav_menu for polylang?

    If I select any language it is display message –

    Not Found
    Sorry, but you are looking for something that isn’t here.

    Any idea…. 🙂

    #115556

    Towfiq I.

    administrator

    whats your site address Preksha?

    #306308

    Franck Beton

    subscriber

    Hello,
    I’m using the astria pro theme with WPML.
    I paste the code you mentioned (the one with all the brackets) in my functions.php file.

    But the shortcode is not working in the Block title field. It shows up in the front side of the site.

    My site : http://www.lyon-beton.fr

    I’ll try many different combinaisons of the short code as I find severals version of it in your forum, but none of them is working.
    [wpml_language lang=”fr”]
    [wpml_language lang=’fr’]
    [wpml_translate lang=”en”]
    [wpml_translate lang=’fr’]
    [wpml_language language=”fr”]
    [wpml_language language=’fr’]

    Any idea ?

    #306417

    Franck Beton

    subscriber

    To be more precise :
    The classic shortcode from WPML [wpml_translate lang=’en’] is working without the hack in the functions.php file, on these fields only :
    – the content block field
    – the welcome text

    But it’s not working in all the other field of the theme’s options : block titles, block links, Location maps, frontpage posts… and the accordion slider fields.

    Did the hack work for somebody ?

    I really need to have this frontpage in english for monday morning.

    thanks.

    #306443

    Franck Beton

    subscriber

    Me again.

    I don’t really like to play with theme .php files (moreover because I didn’t make a child theme on this site), but i tried something.

    In the content-blocks.php, I noticed that some fields were’nt called with the “do_shortcode()” function.
    So, for instance, I replace
    <h3><?php echo $asteria['block1_text_id']; ?></h3>
    By
    <h3><?php echo do_shortcode($asteria['block1_text_id']); ?></h3>

    But unfortunately, nothing changes.

    #309812

    Towfiq I.

    administrator

    you made the edit right. you should be able to translate the block 1 title with the shortcode after the edit. give it a try and let me know.

    Thanks

    #316946

    Franck Beton

    subscriber

    Hi Towfiq,

    as you writed it: my edit is working.
    The shortcode to use is this one : [wpml_language lang=’fr’]

    But unfortunately, this hack is not working with the “front page posts title and description”…
    I didn’t try with the accordion slider yet, because it’s becoming a little too dangerous for me (I’m not really a coder). I’ve just given up.
    I was very pleased with Asteria Pro : very clean and easy to use. It will still be my choice if I didn’t need to have an multilingual e.commerce website.
    I’m wandering if I’ll not move to another theme.
    Unless you have a quick solution for translating the accordion correctly…

    Thanks for the quick support anyway.
    franck.

    #327638

    Towfiq I.

    administrator

    1. To make the accordion slider fields translatable, open up accordion.php and replace this:

                                   <h3 class="entry-title">
                                   <a <?php if (!empty ($arr['slide_url'])) { ?>href="<?php echo $arr['slide_url']; ?>"<?php } ?>><?php echo $arr['slide_title']; ?></a>
                                   </h3>
                                   <p><?php echo $arr['slide_description']; ?></p>

    with this:

                                   <h3 class="entry-title">
                                   <a <?php if (!empty ($arr['slide_url'])) { ?>href="<?php echo do_shortcode($arr['slide_url']); ?>"<?php } ?>><?php echo do_shortcode($arr['slide_title']); ?></a>
                                   </h3>
                                   <p><?php echo do_shortcode($arr['slide_description']); ?></p>

    2. To make the “front page posts title and description” translatable, open up layout3.php and replace this:

    <?php echo $asteria['posts_title_id']; ?>

    with this:

    <?php echo do_shortcode($asteria['posts_title_id']); ?>

    #328277

    Franck Beton

    subscriber

    Thanks man.
    It’s working fine.
    I’ve done the same trick for the accordion link.
    I’m gonna keep your theme for a little longer for sure.

    thanks again.

    #531589

    rosy ros

    subscriber

    Hi, sorry but I pasted the code in function.php and there aren’t problem but when I paste [wpml_language language=”en”] [/wpml_language] in the blocks field in Theron Theme Option or in welcome field it don’t run, I see the code in home page 🙁

    I need the english version as soon as possible, can you help me?
    Thanks!

1 2

The topic ‘Home page and options translation’ is closed to new replies.