Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • valthebault Friend
    #941114

    Hi,

    I asked a question about adding an extra link on the home page and it worked very well: https://www.joomlart.com/forums/topic/how-to-add-a-link-on-the-page-of-list-of-all-articles/ Thanks again to @Sagyaros.

    However, now that my site is bilingual and the link I added is ALWAYS in French even when I switch to English. I would like to know how I could adapt the link to the multilanguage feature.

    here’s my site: globbiz.net, if you put globbiz.net/en, you’ll have the english version.

    In the attachment I illustrate the link in English


    1. Nos_Témoignages
    Saguaros Moderator
    #941429

    Hi

    You can change to this:

    <a href="https://www.joomlart.com"><?php echo JText::_('LINK_HERE') ;?></a>

    And add translated text for associated language file: LINK_HERE = "your text here"

    valthebault Friend
    #942027

    Hi,

    Thanks for the response, I was about to do that when I found out I don’t really know where to add the text in my language file.

    If I understood correctly, I will replace ‘LINK HERE’ in this example: http://prntscr.com/9xja5q By ‘<?php echo JText::_(‘LINK_HERE’) ;?> and I’ll add the translated text of ‘nos témoignages’ in the file en-GB.tpl_ja_mono.ini.

    Is that correct?

    Thanks again.

    Saguaros Moderator
    #942030

    That’s correct!

    valthebault Friend
    #942139

    This is fantastic, worked like a charm.

    One problem left though: I need to adapt the LINK to the language too, aka the ‘https;//www.joomart.com in your exemple http://prntscr.com/9xja5q

    How should I define the links?

    Thanks

    Saguaros Moderator
    #942236

    No, you can’t have different link for each language in this way. Its applied for language text only. This link is unique.

    valthebault Friend
    #942388

    That’s a bummer. Any ways I could condition the link to fit different language, like If english, go to this link or any other method to add a link on the page and have it behave differently?

    Saguaros Moderator
    #943060

    I don’t think its possible.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 7 replies, has 2 voices, and was last updated by  Saguaros 8 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum