Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Trying to add $ in my labels.txt but it won't work?

  • snowball77
  • snowball77's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #41364 by snowball77
Hi There,
I am adding some titles and descriptions into my labels.txt file.
However when I add $650.00 for example in the code, the character $ obviously is read as something else.
Does anyone know how I can get around this so I can show a dollar sign in my labels?
A

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #41365 by Katia
Replace $ with &36;

For more info:
www.w3.org/MarkUp/html3/latin1.html

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • snowball77
  • snowball77's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #41366 by snowball77
Hello, Thanks so much for the reply.
I tried this change but it is reading it literally - see I use this

Aloe-spicata.jpg||<b>Black Botanica: Aloe Spicata </b>
No. BB01: LTD. ED. 75 Size 850 x 600mm
Print &36;650.00 Framed &36;850.00

And you can test it here webc5.sky.studiocoast.com.au/index.php?option=com_content&view=article&id=5&Itemid=2

It is still showing as $36;

Is there something else I have to do?

Please Log in or Create an account to join the conversation.

  • snowball77
  • snowball77's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #41367 by snowball77
HI - Can anyone shed any light on this please, I really need to fix this ASAP.
I have used the &36; to try and show $ and it will not work??

Please help?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #41368 by JoomlaWorks
&36; is the HTML equivalent of the $ sign. It looks like PHP is doing something weird here when sanitizing the label description. Can you please use USD as a workaround until we figure why this happens?

So, e.g. display prices like this: "Buy this for USD 20"


OK, it looks like PHP is to blame here... It parses the labels file as PHP and therefore things e.g. $20 is a variable and hides it completely. The solution is to "escape" the $ sign.

So in your labels instead of writing e.g. "$20 for this", write "\$20 for this" (without the quotes of course...).

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago - 13 years 5 months ago #41369 by backlashforblow
Replied by backlashforblow on topic Re: Trying to add $ in my labels.txt but it won't work?

Hello, Thanks so much for the reply.
I tried this change but it is reading it literally - see I use this

Aloe-spicata.jpg||<b>Black Botanica: Aloe Spicata </b>
No. BB01: LTD. ED. 75 Size 850 x 600mm
Print &36;650.00 Framed &36;850.00

And you can test it here webc5.sky.studiocoast.com.au/index.php?option=com_content&view=article&id=5&Itemid=2

It is still showing as $36;

Is there something else I have to do?




sounds good to me. It really helped me out a lot. Thanks  ;D



Wedding Hairstyles

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #41370 by Alexander Radin
Replied by Alexander Radin on topic Re: Trying to add $ in my labels.txt but it won't work?
I was able to get it to work by using $36 with a space before the price so:

"$36 2,400" works but it does not work if the space is not there and it does not work if you use "$36;" (with the semicolon). No quotes of course.

The solution of escaping it did not work for me.

Please Log in or Create an account to join the conversation.

  • snowball77
  • snowball77's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #41371 by snowball77
Hi All,
Thanks for getting back to me on this one
I ended up using a line like this so $36$ 850.00 worked for me !

Aloe-spicata.jpg||<b>Black Botanica: Aloe Spicata </b>
No. BB01: LTD. ED. 75 Size 850 x 600mm
Print $36$ 650.00 Framed $36$ 850.00

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum