• Hi, i start to become crazy trying to translate some strings.. so please, someone can help me?

    i have a title in my theme frontpage, and i need to translate it in 2 languages.. now:

    1) the title is called in the php page content-frontproducts.php by this code:`<div class=”store-info”>
    <?php if (get_theme_mod(‘store_archives_title’)) : ?>
    <h2 class=”store-title”><?php echo esc_html(get_theme_mod(‘store_archives_title’)); ?></h2>
    <?php endif; ?>`
    2) i put in the functions.php the following script: `/* Custom for Polylang */
    pll_register_string(‘Featured Products’, ‘store_archives_title’);`
    3) i wrote the text in the 2 languages in the polylang plugin
    4) then to test it i put the code <?php echo pll__('smartshop_edd_store_archives_title'); ?> in the page content-frontproducts.php, at the begin of the page and really it appear the text in the correct language in each page..

    now, to make the test appear right in the title, wht i have to do???

    please, i’m not a programmer, i just tryoing to solve this issue and i’t pretty difficult for me.. thanks for any help you can give me ??

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Advex

    (@totalfly)

    sorry.. in the point 4 i put just pll__(‘store_archives_title’); ?>

    Thread Starter Advex

    (@totalfly)

    ok.. i solve in this way, but i don’t know if is the right way..

    i put at the begin of the page <div class=”store-info”><h2 class=”store-title”><?php echo pll__(‘store_archives_title’); ?></h2></div> and then i delete from the template title customization the old text.. now it’s working as i wanted, but i don’t know if it’s the right solution.. maybe i will have a lot of problems with other more difficult strings ??

    if you have any suggestion, pease don’t hesitate to post your comments ??

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘String.. string.. string…’ is closed to new replies.