CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 How do I display correct currency symbol in Internationalized app.

Print topic Send  topic

Author Message
cvboucher

Posts: 191
Posted: 11/29/2010, 11:14 AM

How do I display the correct currency symbol in my Internationalized application? If I use a $ in the format property it always displays a dollar sign regardless which langurage is currently selected. If I do a String.Format("{0:C}", number) in Before Show embedded code it displays the correct currency symbol but I'd rather not have to add embedded code in for every field that needs to display currency.

Thanks,
Craig
View profile  Send private message
cvboucher

Posts: 191
Posted: 12/14/2010, 8:31 AM

I found a fix for this. I sent it to support but my support plan has expired. I think it is a bug. Below is what I sent to support in case anyone else needs it. I'm using the ASP.NET VB templates.

Quote :
I'm in the process of internationalizing my application and need to display currency in the appropriate locale. I tried putting a C in the Format property of some report labels but this just displayed C in the report output. So I made the following changes to the FormatNumber method in the DataUtility.vb program

I changed:
If Tokens.Length > 0 Then format_ = format_ & Tokens(0) & ";"
If Tokens.Length > 1 Then format_ = format_ & Tokens(1) & ";"
If Tokens.Length > 2 Then format_ = format_ & Tokens(2) & ";"

To:
If Tokens.Length > 0 Then format_ = format_ & Tokens(0)
If Tokens.Length > 1 Then format_ = format_ & ";" & Tokens(1)
If Tokens.Length > 2 Then format_ = format_ & ";" & Tokens(2)

This allowed what I entered in the Format property to be passed as C instead of C; (which caused the ToString method to not work properly). Problem is everytime I publish my project or page, it overwrites my changes. I found DButility.ccl in the CodeCharge CodeTemplates directory but this file doesn't appear to be editable. Is there a way for you to incorporate this fix into something you can send me so I don't have to re-edit the file everytime I publish?

Thanks,
Craig
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.