PDA

View Full Version : Quick one: How to add HTML tags in language files?


forsure
23rd of October 2006 (Mon), 06:56
Greetings,

Typical lang file has entries like:

$translated["multiarea_first"] = "you are viewing the first photo in this selection";
$translated["multiarea_last"] = "you are viewing the last photo in this selection";

I have been so far unable to figure out a way of adding html tags (such as to make a word bold or italic or a paragraph return) that are rendered as html in the resulting pages.

From what I understand the prog always references a translation function with ee_translate_A("text here"), but how to get this function to accept html tags? Must be simple but is beyond me.:cry:

Thanks for any pointers...

Forsure:)

Pekka
23rd of October 2006 (Mon), 08:32
You add the html in templates, not translations.

You can of course do

print "<b>" . $translated["multiarea_first"] . "</b>";

but that would in most cases not be what you want because this way you omit page logic.

forsure
23rd of October 2006 (Mon), 08:41
Thanks for your help, I realise that normally templates are what you use for html, however I came across a few cases where html in the translation pages could be useful, in particular where a certain language version results in a very long phrase and you wish to break it into two paragraphs. If it's not possible I will go no further,but can you confim that there is no way to include even the most basic tag in the actual transalation file and have them rendered correclty (I seem to recall seeing a url or img reference in a lang file somewhere). Thanks again, and my compliments for the program.

forsure