Jump to content

Direct link multilanguage


Recommended Posts

Hello everyone!

 

I made a direct link in the footer with html codes. <a href="...">LINK</a>

I would like to make the word "Link" change with the userlanguage.

Is there a code to make this? Like "if language="6" set: Link; else..."

I ahve only two languages.

 

Is there a different way you advise?

 

Thank for your help!

Link to comment
Share on other sites

if it is not inside a module, use

{l s='LINK TEXT'}

Or if it is inside a module use

 

{l s='LINK TEXT' mod='module_name'}

You will not be able to translate it using the Prestashop translation engine (Tools->Translations)

Link to comment
Share on other sites

Thanks for your help! Unfortunately, I don't really get it. Here is my sample. (themes/prestashop/modules/blockcms/blockcms.tpl)

 

<!-- MODULE Block footer -->

<ul class="block_various_links" id="block_various_links_footer"><a href="http://www.ceeoe.eu/walmag" style="text-decoration:none">Home</a>

{foreach from=$cmslinks item=cmslink}

{if $cmslink.meta_title != ''}

<li class="first_item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>

 

I would like to make the link word "Home" to change to "Főoldal" when using Hungarian (language number 6). And stay "Home" when using english (language number 1)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...