This topic is locked

$ to £

9/2/2009 1:33:55 PM
PHPRunner General questions
C
clifford author

Hi

Hope some one help me. I have created a vacation web site with phprunner.

on the search by price it defaults to $ how can I change it to £.
Many Thanks

J
jsuisman 9/2/2009



Hi

Hope some one help me. I have created a vacation web site with phprunner.

on the search by price it defaults to $ how can I change it to £.
Many Thanks


Hiya Clifford,
I had to figure out something similar to this once as well. The problem with this fix is that you modify a generated file, so every time you build the project, you will have to go and change it again. I'm sure there is a way to modify the locale.php in Program Files to make it permanent, but I haven't looked at it.
To change the currency marker:
1 Use textpad or wordpad to open the locale.php file. It's located in yourproject/output/include/locale.php
2 Do a ctrl-f search or look (line 69?) for $locale_info["LOCALE_SCURRENCY"]
3 The value there is the octal value of the dollar sign (044). Change it to 243 and it should display pound symbol. Make sure to leave the backslash though. So the line should read:

$locale_info["LOCALE_SCURRENCY"]="\243";


4 Save the file.
Keep in mind that you'll probably have to do this every time you make a change and rebuild the project. Sergei or Jane may be able to give you a way to change it permanently though.
Good luck,
Jarred

C
clifford author 9/2/2009

Hi Jarred

Thanks for your help
On line 69 $locale_info["LOCALE_SCURRENCY"]

It all ready reads $locale_info["LOCALE_SCURRENCY"]="\243";

So what next

J
jsuisman 9/2/2009

Hmm strange,
I guess that makes sense since the locale setting of your computer is most likely set to use the sterling pound. Mine is set to use US dollar so apparently phprunner plugs in $ for me. When I change that line to 243 though my page outputted £ signs in place of the normal $.
As a test, maybe try changing it to 200 and see if € sign shows up instead? Then we'll at least know if we're on the right track.
I'm guessing that Sergei or Jane is going to chime in sometime soon with a more definitive answer soon as well.
Jarred

K
KevinMillican 9/2/2009



Hi

Hope some one help me. I have created a vacation web site with phprunner.

on the search by price it defaults to $ how can I change it to £.
Many Thanks


I seem to recall that if you have a date field, you can set the locale in the PHPrunner interface and it affects all your international stteings for that application

J
jsuisman 9/3/2009

Clifford,
I must not have been thinking yesterday. On the miscellaneous page (after Field orders and Totals and before the Security Page) under the sections there is a setting for regional settings. If you change that to English(British) it should show the sterling pound symbol. It does for me anyways. And it also changes the way the dates are displayed.
But...since your LOCALE_SCURRENCY setting was already set to 243, then I'm not sure if this will work for you or not.
Good luck,
Jarred

C
clifford author 9/3/2009

Jarred
The regional settings are set to English(British)

but still the $ sign
Thanks

Clifford

S
swanside 9/3/2009



Jarred
The regional settings are set to English(British)

but still the $ sign
Thanks

Clifford



Have you looked in Control Panel on your computer and set the regional and language Options settings to English UK?

Sergey Kornilov admin 9/5/2009

Clifford,
I recommend to post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation.

S
swanside 9/6/2009

I tried the same with the Members Template, and it displays $ even through the regional seeting and other settings are English

S
swanside 9/10/2009



I tried the same with the Members Template, and it displays $ even through the regional seeting and other settings are English


Any update on this?

Sergey Kornilov admin 9/10/2009

I recommend to post your application to Demo Account (use 'Demo Account' button on the last screen in program). Then open a ticket at http://support.xlinesoft.com sending your Demo Account URL for investigation.

J
jsuisman 9/10/2009



Any update on this?


Not sure what the problem is since both changing the regional settings within phprunner and also manually editting the LOCALE_SCURRENCY in locale.php works on my system...
That said, I suppose a quick and easy fix would be the following:
1 Go to Visual Editor page, then choose whichever page is displaying the wrong currency format.
2 Double click the yellow box that represents the variable. Make sure you are on the "View As" tab. I assume this is set as currency since you're getting the $ sign.
3 Click "Custom".
4 In the box on the right, type



$value = '£'.$value;


5 Click ok.
not sure how well you know php, but this basically just takes the value from the database and concatenates a £ symbol in front of it. If your database field for this value isn't set up something like DECIMAL(8,2) then you may get some strange values like £199.99999 but using the following code instead the above code, you could format it correctly with two decimal places.



$value = '£'.number_format($number,2);


This is basically what phprunner does in the background when you choose currency display type.
Good luck, let me know if it works.
Jarred