Archived:Internationalising currencies in Symbian C++
|ID||CS000856||Creation date||March 25, 2008|
|Platform|| S60 3rd Edition, MR
S60 3rd Edition, FP1
S60 3rd Edition, FP2 Beta
|Tested on devices|| Nokia E61i|
Nokia E90 Communicator
Nokia N95 8GB
Nokia 6220 Classic
This code snippet is one of the series of snippets that demonstrate how to implement support for international diversity. This snippet shows how to format currency according to the locale settings of the device.
// Buffer for localized text
// The amount is an integer, but it is treated as if the last two digits
// were decimal digits. E.g. 1249 = 12.49, 2 = 0.02, 002 = 0.02 ...
TInt myAmount = 123456789;
// Locale is initialized with system's current locale settings
// Format currency according to current locale settings
Currency is formatted according to the locale settings of the device.