Hello,
On Fri, Jul 5, 2013 at 8:54 PM, didinj <[email protected]> wrote:

> I have situation when I'm use currency(money) in google app engine java.
> When I run application locally (in eclipse), it show right currency "Rp".
> But when I deploy application to google app engine server currency change
> to "$", I guess in google app engine server have United States Regional
> Setting.
>
> My question, how to change regional setting in app engine?
>

How are you using the currency setting? If you're using the default
NumberFormat.getCurrencyInstance(), that uses the default Locale to figure
out what the currency is and then do the formatting. Your PC has a default
locale different to that of App Engine.

You can avoid this by generating a Locale object that represents your
country, then extract a NumberFormat object from that. Short version: use
the constructors for the Locale object to specify your language and country
codes (see http://docs.oracle.com/javase/6/docs/api/java/util/Locale.html for
documentation, you need to pass in the appropriate ISO codes). Once you
have your Locale object, call NumberFormat.getCurrencyInstance(Locale
customLocale) and then use the NumberFormat object returned from that to do
your currency formatting.


-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to