User (Legacy) Posted April 10, 2003 Report Share Posted April 10, 2003 Hey folks, We are a data-driven, 100% pure Java application that interfaces to ChartFX via HTTP and an ASP. When people select data from datasources in our product, they specify (using Java Locale's) the locale of the currency for currency columns. If they choose German Euro, the java locale becomes de-ch_EURO (or similar). If they choose German Marks, that is simply de-ch. Well, for Winblows (and ChartFX), there is the concept of LCID's. Unfortunately, Winblows doesn't seem to have/publish LCID's for non-euro currency in euro countries. For example, just because there is the Euro, doesn't mean that the Deutsch Mark has vanished from the planet. We have customers with DM accounts. So, how would someone with ChartFX Internet edition go from a Java Locale to a Winblows LCID for DM? I have a simple(ish) convert function from the MS site that will try to interpret the locale from the HTTP header (HTTP_ACCEPT_LANGUAGE) to come up with an LCID. With this, I can go from "en-us" to 1033. But, how do I specify in ChartFX that a value is DM, and not euro's with the LCID? I have also seen the CurrencySymbol in ChartFX. But, you can't use that alone, and have it figure out where the currency symbol goes. That is, just setting the CurrencySymbol to "DM" will fail because you end up with DM5000.20 instead of 5000.20 DM So, what am I supposed to do? I don't want to have to "know" that "de-ch" has a symbol of DM that appears at the end of the number. I just want to tell ChartFX to use LCID 1234 for "de-ch" and LCID 5678 for "de-ch_EURO". Can anyone help? Thanks, Marc Batchelor Link to comment Share on other sites More sharing options...
Software FX Posted April 11, 2003 Report Share Posted April 11, 2003 You can use the CurrencySymbol property to assign your own custom currency symbol regardless of the locale. You will need to use the Locale in combination with this property to achieve what you need. For example: ChartFX1.Axis(AXIS_Y).Locale = &H407 ' German Standard ChartFX1.Axis(AXIS_Y).Format = AF_CURRENCY ChartFX1.Axis(AXIS_Y).CurrencySymbol = "DM" Will produce: 5000,20 DM LCID's are defined by Windows, if Windows doesn't have a locale that describes German using Deutsch Mark we can't invent one. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Software FX Posted April 11, 2003 Report Share Posted April 11, 2003 Note that to achieve the right positioning of the currency symbol we can add a property (CurrencyLocation) that you can use to set whether the currency symbol is used as a suffix/prefix and if a space is required. This would be a minor change since the WindowsAPI already supports this and we are now using the default value for the locale. Given the fact that Windows does not seem to have a non-euro locale anymore (at least in WinXP SP1 I could not find it), the only workaround I see would be for you to write a small program that queries the currency symbol,currency location and language name for all European locales. If you run such a program in a pre-euro OS (Win2K no SPs) you could end up with a table that contains all the info your need, e.g. de-ch 1234 DM 2 At runtime, if you receive de-ch_EURO you will use the locale but you will not set any ChartFX properties, if you receive de-ch you will use both the locale and the ChartFX currency properties to adjust the currency to the pre-euro settings. -- Regards, JC Software FX Support "Marc Batchelor" <PleaseReplyToGroup@nowhere.com> wrote in message news:twKtVR5$CHA.2992@webserver1.softwarefx.com... > Hey folks, > > We are a data-driven, 100% pure Java application that interfaces to ChartFX > via HTTP and an ASP. When people select data from datasources in our > product, they specify (using Java Locale's) the locale of the currency for > currency columns. If they choose German Euro, the java locale becomes > de-ch_EURO (or similar). If they choose German Marks, that is simply de-ch. > > Well, for Winblows (and ChartFX), there is the concept of LCID's. > Unfortunately, Winblows doesn't seem to have/publish LCID's for non-euro > currency in euro countries. For example, just because there is the Euro, > doesn't mean that the Deutsch Mark has vanished from the planet. We have > customers with DM accounts. > > So, how would someone with ChartFX Internet edition go from a Java Locale to > a Winblows LCID for DM? > > I have a simple(ish) convert function from the MS site that will try to > interpret the locale from the HTTP header (HTTP_ACCEPT_LANGUAGE) to come up > with an LCID. With this, I can go from "en-us" to 1033. But, how do I > specify in ChartFX that a value is DM, and not euro's with the LCID? > > I have also seen the CurrencySymbol in ChartFX. But, you can't use that > alone, and have it figure out where the currency symbol goes. That is, just > setting the CurrencySymbol to "DM" will fail because you end up with > > DM5000.20 > > instead of > > 5000.20 DM > > So, what am I supposed to do? I don't want to have to "know" that "de-ch" > has a symbol of DM that appears at the end of the number. I just want to > tell ChartFX to use LCID 1234 for "de-ch" and LCID 5678 for "de-ch_EURO". > Can anyone help? > > Thanks, > > Marc Batchelor > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 17, 2003 Author Report Share Posted April 17, 2003 > LCID's are defined by Windows, if Windows doesn't have a locale that > describes German using Deutsch Mark we can't invent one. I agree. So, I would come to the conclusion that ChartFX IE has a design flaw because it cannot simply accommodate such things. French Franc, Deutsch Mark, etc. The appropriate solution imho is to either support "en-us" notation, or format masks. Of course, there is no "standard" handling for Euro/non-Euro (and hence, Java hacks it with the _EURO). While I think a default of Euro when told "de-ch" is probably correct (instead of Java's default of non-Euro), there should be some flag to indicate a non-Euro currency (which would then fall back to DM, FR, etc). There is another fundamental flaw though with the specification of LCID's, and that has to do with user preferences/control-panel settings. Since ChartFX IE is a server-based product, it can't know the formatting preferences of each user with regard to seperators and the like. This is where the format mask would also come in handy. Anyway, that's the way I see it. Marc Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 13, 2004 Author Report Share Posted February 13, 2004 To be clear: Is CurrencyLocation a current property? If not, it is being added? This is a property that we would need in our internationalization efforts. "Software FX Support" <support@softwarefx.com> wrote in message news:DTVDTKEADHA.1744@webserver1.softwarefx.com... > Note that to achieve the right positioning of the currency symbol we can add > a property (CurrencyLocation) that you can use to set whether the currency > symbol is used as a suffix/prefix and if a space is required. This would be > a minor change since the WindowsAPI already supports this and we are now > using the default value for the locale. > > Given the fact that Windows does not seem to have a non-euro locale anymore > (at least in WinXP SP1 I could not find it), the only workaround I see would > be for you to write a small program that queries the currency > symbol,currency location and language name for all European locales. If you > run such a program in a pre-euro OS (Win2K no SPs) you could end up with a > table that contains all the info your need, e.g. > > de-ch 1234 DM 2 > > At runtime, if you receive de-ch_EURO you will use the locale but you will > not set any ChartFX properties, if you receive de-ch you will use both the > locale and the ChartFX currency properties to adjust the currency to the > pre-euro settings. > > -- > Regards, > > JC > Software FX Support > "Marc Batchelor" <PleaseReplyToGroup@nowhere.com> wrote in message > news:twKtVR5$CHA.2992@webserver1.softwarefx.com... > > Hey folks, > > > > We are a data-driven, 100% pure Java application that interfaces to > ChartFX > > via HTTP and an ASP. When people select data from datasources in our > > product, they specify (using Java Locale's) the locale of the currency for > > currency columns. If they choose German Euro, the java locale becomes > > de-ch_EURO (or similar). If they choose German Marks, that is simply > de-ch. > > > > Well, for Winblows (and ChartFX), there is the concept of LCID's. > > Unfortunately, Winblows doesn't seem to have/publish LCID's for non-euro > > currency in euro countries. For example, just because there is the Euro, > > doesn't mean that the Deutsch Mark has vanished from the planet. We have > > customers with DM accounts. > > > > So, how would someone with ChartFX Internet edition go from a Java Locale > to > > a Winblows LCID for DM? > > > > I have a simple(ish) convert function from the MS site that will try to > > interpret the locale from the HTTP header (HTTP_ACCEPT_LANGUAGE) to come > up > > with an LCID. With this, I can go from "en-us" to 1033. But, how do I > > specify in ChartFX that a value is DM, and not euro's with the LCID? > > > > I have also seen the CurrencySymbol in ChartFX. But, you can't use that > > alone, and have it figure out where the currency symbol goes. That is, > just > > setting the CurrencySymbol to "DM" will fail because you end up with > > > > DM5000.20 > > > > instead of > > > > 5000.20 DM > > > > So, what am I supposed to do? I don't want to have to "know" that "de-ch" > > has a symbol of DM that appears at the end of the number. I just want to > > tell ChartFX to use LCID 1234 for "de-ch" and LCID 5678 for "de-ch_EURO". > > Can anyone help? > > > > Thanks, > > > > Marc Batchelor > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.