HTML Tags in .ini files

A place to discuss Joomla! translation matters.

Moderator: wendhausen

User avatar
cindio
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Fri Jul 27, 2007 3:13 pm
Contact:

HTML Tags in .ini files

Post by cindio » Sun Aug 19, 2007 8:24 pm

I'm sure it's fine to add common HTML tags in the .ini files while translating, but I'd like verification. For example, I noticed that in
en-GB.com_config.ini (in Administrator), some of the tooltips use the emphasis tag for the title names, but one or two titles lacked that, so I added them. Also and .
definitely does work to end a line!
Generally, I'll stick to what I see in the original en-GB file, but inserting common tags and escapes might be helpful, just want to know what you think.
Last edited by cindio on Sun Aug 19, 2007 8:37 pm, edited 1 time in total.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Mon Aug 20, 2007 7:13 am

I suggest you report your findings in the 1.5 Q&T forum in order for devs to correct the output if necessary.
http://forum.joomla.org/index.php/board,199.0.html

Please do state the SVN number or date of nightly build as all strings may have been corrected since RC1.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
cindio
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Fri Jul 27, 2007 3:13 pm
Contact:

Re: HTML Tags in .ini files

Post by cindio » Mon Aug 20, 2007 10:32 am

No errors, just a matter of styling! I just wanted 'permission' to use tags.
I'll just go ahead and use them, they work fine.

goulvench
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Jul 19, 2007 7:27 am
Location: France
Contact:

Re: HTML Tags in .ini files

Post by goulvench » Mon Oct 29, 2007 1:26 pm

HTML can be used in ini files but should NOT contain the equal sign (=), otherwise the PHP function parse_ini_file which is probably used by Joomla to read these files will throw an error.

User avatar
cindio
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Fri Jul 27, 2007 3:13 pm
Contact:

Re: HTML Tags in .ini files

Post by cindio » Mon Oct 29, 2007 1:56 pm

Thank you! I'm glad I've been cautious about it and just used the tag.

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: HTML Tags in .ini files

Post by humvee » Sat Nov 03, 2007 12:06 am

Cindio
There is absolutely no problem using HTML to improve the appearance of the language files, and how you choose to do that for your own translation is entirely up to you. There are many examples that I would like to improve in the en-GB files but time constraints prohibit this for now. This is more feature request then essential priority. Making sure the translation strings are there and complete are my priority for the moment.
Regards

Andy

ps the same goes for cleaning up the deprecated strings that still exist in abundance at the present time, there is nothing stopping their removal "locally" if that is what is desired just list these in the translation together with the file name and they can be removed from en_GB as I get chance.

giannis_rx
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jul 05, 2007 5:49 pm

Re: HTML Tags in .ini files

Post by giannis_rx » Mon Jul 20, 2009 11:49 am

Hi,

Do you know how to add html tags in a language file of Joomla?

like this:

Code: Select all

YOU ARE ALREADY REGISTERED.=You alreade registered.<br />Go back http://www.joomla.org
Thank you.

User avatar
ot2sen
Joomla! Master
Joomla! Master
Posts: 10381
Joined: Thu Aug 18, 2005 9:58 am
Location: Hillerød - Denmark
Contact:

Re: HTML Tags in .ini files

Post by ot2sen » Mon Jul 20, 2009 12:25 pm

Hi giannis_rx,

Try adding the <a href for the url, if that is what you are asking :)

Code: Select all

YOU ARE ALREADY REGISTERED.=You alreade registered.<br />Go back <a href="http://www.joomla.org">http://www.joomla.org</a>
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

giannis_rx
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Jul 05, 2007 5:49 pm

Re: HTML Tags in .ini files

Post by giannis_rx » Tue Jul 21, 2009 9:10 am

Hi, thanks for reply,

I take this in email, html does not work.

You alreade registered.<br />Go back <a href="http://www.joomla.org">http://www.joomla.org</a>

Any Ideas?

User avatar
ot2sen
Joomla! Master
Joomla! Master
Posts: 10381
Joined: Thu Aug 18, 2005 9:58 am
Location: Hillerød - Denmark
Contact:

Re: HTML Tags in .ini files

Post by ot2sen » Tue Jul 21, 2009 9:41 am

Ok, we had a similar report in the last days concerning another string from the ini-files.

Will have a closer look at this one too
Ole Bang Ottosen
Dansk frivillig Joomla! support websted - joomla.dk
OpenTranslators Core Team opentranslators.org

chimera_sound
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Wed Mar 22, 2006 9:19 pm

Re: HTML Tags in .ini files

Post by chimera_sound » Thu Oct 15, 2009 9:30 pm

Anybody got a solution for adding a link to the language?

thanks
kobi

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Fri Oct 16, 2009 7:13 am

One can add a "normal" link to any string in Joomla.
If the string is displayed on site, the html will be correctly displayed.
If the string is sent by mail then it should be formatted as
<a href="http://www.joomla.org"</a>
The url will be clickable but will display the tags in the mail client.

One could add http headers in the string in order to display formatting in the email client, similar to a Newsletter, but that would be quite heavy.

Concerning the use of html tags generally, it may depend on the string. In some cases, it is advised to use html entities for the tags and special characters as "="

Exemple:
<jdoc:include type = "message" /> in the description of an extension will not display.
But
<jdoc:include type &#x003D; "message" />
will.

The use of single quotes (and other special chars as | ) is strictly depending on the way the string is parsed to display.
They may have to be escaped to avoid breaking some code
\' and \|

Example
ICON_SEP=\|
in language/en-GB/en-GB.ini
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ddlooping
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Dec 05, 2010 6:51 pm

Re: HTML Tags in .ini files

Post by ddlooping » Sun Dec 05, 2010 6:56 pm

Hi all :)

Sorry to revive this old thread but adding html to the .ini language file does not work for me.
The html appears as code.

Code: Select all

Your Account has been successfully activated. You can now <a href="#login">log in using the username and password</a> you chose during the registration.
Any help would be appreciated. ;)

dimkasta
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 01, 2005 12:47 pm

Re: HTML Tags in .ini files

Post by dimkasta » Mon Dec 27, 2010 7:49 pm

Try using single quotes

ddlooping
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Dec 05, 2010 6:51 pm

Re: HTML Tags in .ini files

Post by ddlooping » Mon Dec 27, 2010 8:35 pm

dimkasta wrote:Try using single quotes
Thanks, dimkasta, but I think I already did.
I'll give it another try though. ;)

dimkasta
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 01, 2005 12:47 pm

Re: HTML Tags in .ini files

Post by dimkasta » Mon Dec 27, 2010 10:35 pm

You might also want to try using entities instead of = and #

ddlooping
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Dec 05, 2010 6:51 pm

Re: HTML Tags in .ini files

Post by ddlooping » Mon Dec 27, 2010 10:45 pm

dimkasta wrote:You might also want to try using entities instead of = and #
Thanks, will do. :)

armello
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Dec 29, 2010 5:59 pm

Re: HTML Tags in .ini files

Post by armello » Wed Dec 29, 2010 6:15 pm

Hi people,

I am going through the same problem, i am using pt-BR language file, and i am trying to insert html code into the new user welcome mail, but the e-mails show the code (Tags) instead of just "teste"

I edited the line 30 as below:

NEW_USER_MESSAGE=<html><head></head><body>teste</body></html>

Have tried many other ways. Any trick?

When I change another *.ini field, the site recognize ok, but when the field is about mail, it do not work.
In Portuguese I have to put this e-mail in html format because I need to show characters like “ç” “á” “ê”. So I need to write it in UTF-8 coding. You see?

thanks in advance

Alexandre Mello

armello
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Dec 29, 2010 5:59 pm

Re: HTML Tags in .ini files

Post by armello » Wed Dec 29, 2010 6:48 pm

armello wrote: I edited the line 30 as below:

NEW_USER_MESSAGE=<html><head></head><body>teste</body></html>
talking about pt-BR.com_users.ini file

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Thu Dec 30, 2010 10:47 am

In Portuguese I have to put this e-mail in html format because I need to show characters like “ç” “á” “ê”. So I need to write it in UTF-8 coding. You see?
Nope, html formatting as nothing to do with UTF8 charset.
If your ini mail string contains utf8 characters, they should display OK in the mail sent.

Joomla mail are sent with
Content-Type: text/plain; charset="utf-8"

<x-charset utf-8>
some text

</x-charset>
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

armello
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Dec 29, 2010 5:59 pm

Re: HTML Tags in .ini files

Post by armello » Thu Dec 30, 2010 12:55 pm

Ok Thats right... I was writing the UTF-8 Code intead of the regular caracter, and was not working... Now it's ok.. but the HTML TAGs remain apearing at the mesenge.

baparks
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Fri Mar 09, 2007 5:13 pm

Re: HTML Tags in .ini files

Post by baparks » Tue Feb 26, 2013 8:59 pm

I was wondering if you could reference image files to display and internal links via the language file as well. If so would you kindly tell me how?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Wed Feb 27, 2013 12:27 pm

baparks wrote:I was wondering if you could reference image files to display and internal links via the language file as well. If so would you kindly tell me how?
yes, it is possible. Which version of Joomla do you use?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

baparks
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Fri Mar 09, 2007 5:13 pm

Re: HTML Tags in .ini files

Post by baparks » Wed Feb 27, 2013 2:54 pm

I am using J!2.5.7 however after posting this inquiry I accomplished what I set out to do. You can view the results herehttp://dineout-indy.com/broad-ripple-village/yats.html

Thank you.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Wed Feb 27, 2013 5:31 pm

Update to 2.5.9
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

baparks
Joomla! Intern
Joomla! Intern
Posts: 89
Joined: Fri Mar 09, 2007 5:13 pm

Re: HTML Tags in .ini files

Post by baparks » Wed Feb 27, 2013 6:35 pm

Already done. I stated the wrong version number.

Thank you

Pariya
I've been banned!
Posts: 33
Joined: Tue Jan 15, 2013 7:06 am

Re: HTML Tags in .ini files

Post by Pariya » Wed Mar 13, 2013 6:24 am

hi ever body i want to add
Your Account has been successfully activated. You can now log in using the <span style="font-size:18px">username</span> and <span style="font-size:18px">password</span>

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Wed Mar 13, 2013 8:07 am

Pariya wrote:hi ever body i want to add
Your Account has been successfully activated. You can now log in using the <span style="font-size:18px">username</span> and <span style="font-size:18px">password</span>
Except that double quotes should not exist in a constant value in 2.5.x/3.x

example of use:

JLIB_DATABASE_ERROR_FUNCTION_FAILED="DB function failed with error number %s <br /><span style="_QQ_"color: red;"_QQ_">%s</span>"
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

Rezayusefi
I've been banned!
Posts: 24
Joined: Tue Jan 15, 2013 7:05 am

Re: HTML Tags in .ini files

Post by Rezayusefi » Thu Mar 14, 2013 12:24 pm

hi infograf768
i dont undrestand your minig
you said we cant use double quotes
and you show a sample but i didnt undrastand it.
if i want write <div class="text">
can i write it <div class='text'>??
Last edited by Rezayusefi on Fri Mar 15, 2013 7:04 am, edited 1 time in total.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: HTML Tags in .ini files

Post by infograf768 » Thu Mar 14, 2013 3:00 pm

yes you can, but sometimes that will not work.
So better use
"_QQ_"

in the value when you need a doublequote.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Translations”