Jump to content

[Solved] How can I make this line translatable?


Ehinarr
 Share

Recommended Posts

Hi ehinaar,

Where is this line ? in a template file, in a module controlleur, in a front controller or in a class ?

Usually, the translation is accessible like this :

$mobilephoneString = $this->l('Mobile Phone Number:').' '.$mobilephoneNumber;


but i think this line is in a template, so this is the code :

{l s='Mobile Phone Number:'} {$mobilephoneNumber}



Regards,
Joel

Share this post


Link to post
Share on other sites

  • 4 years later...

And how to translate this line here?:
this is a module

<a class="button" href="{$product.link}" title="{l s='more view'}">{l s='more view'}</a>

I already try the codes above and din'd not work

 

Prestashop 1.5.6.2

 

tanks

Edited by majority (see edit history)

Share this post


Link to post
Share on other sites

everything depends on where you used this code. can you elaborate, please?

Hi, tanks for the reply Vekia

 

I have figure it out, this code is from a module that displays feature products on the home page

but the developer forgot to make the (more View) button translatable on the backoffice

the solution I have found is this:

 

Original Code (not translatable):

<a class="button" href="{$product.link}" title="{l s='more view'}">{l s='more view'}</a>

Modified Code (Translatable):

<a class="button" href="{$product.link}" title="{l s='more view' mod='your_module_name'}">{l s='more view' mod='your_module_name'}</a> 

where your_module_name is the name of the module that we want to be translatable

 

Best regards

Edited by majority (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More