Jump to content

[SOLVED] How to add new words (which can be translated) ?


Recommended Posts

Hi,

I added some links in the header.tpl file. Example:

<a href="http://www.somedomain.com">{l s='Some text'}</a>

When I change to French, it still displays as "Some text"

How do I make the text change to French (or other language) when the user changes the language?

Can I add to the \themes\mytheme\lang\fr.php file?



Thanks

PS: I use French as example because the default installation comes with French language.

I hope there is no need to use the BO to change the database, as I prefer the theme to be portable to other server and run without needing to add the words in the BO again.

  • Like 7

Share this post


Link to post
Share on other sites

  • 2 years later...

Hi All...

 

I was able to translate custom words in my theme's tpl files, but i'm still not bale to translate custom words in module's tpl files. Any idea???

 

Thanks

Share this post


Link to post
Share on other sites

Hi All...

 

I was able to translate custom words in my theme's tpl files, but i'm still not bale to translate custom words in module's tpl files. Any idea???

 

Thanks

 

 

It really works the same way in modules except it only works after i added the module in.

 

for instance

 

1. open your module tpl file..e.g. if you are inserting a new word in your homefeatured module, /homefeatured/homefeatured.tpl

 

2. go to the relevant section within the homefeatured.tpl and insert the line as an example e.g.

 

{l s='OFFER GOOD FOR 24 HOURS!' mod='homefeatured'}

 

3. then you save the file

4. go to BO>Tools>Translations

 

5. Modify translation ---choose from the drop down menu

 

Translation of installed modules

 

6. Choose the flag icon ( e.g. france, italian, or finnish in your case)

 

7. Find the module from here e.g. homefeatured

and the phrase you insert should be there.

 

8. Enter the translation or modify as you wished--> and then 'update translation'.

Test in your front office.

 

 

Hope it helps

Edited by halennoor (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

  • 9 months later...
 Share

×
×
  • Create New...

Important Information

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