×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Internationalising currencies in Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix links)
 
Line 54: Line 54:
 
==See also==
 
==See also==
  
* [[Internationalising real numbers in Symbian C++]]
+
* [[Archived:Internationalising real numbers in Symbian C++]]
 
* [[Internationalising timestamps in Symbian C++]]
 
* [[Internationalising timestamps in Symbian C++]]
* [[Internationalising images on Symbian C++]]
+
* [[Archived:Internationalising images on Symbian C++]]
 
* [[Localizing strings on Symbian C++ apps]]
 
* [[Localizing strings on Symbian C++ apps]]
 
* [http://www.developer.nokia.com/info/sw.nokia.com/id/1c82873d-183e-4073-afdb-22e09a5dc8c5/S60_Platform_Localization_Example_v1_0_en.zip.html S60 Platform: Localization Example]
 
* [http://www.developer.nokia.com/info/sw.nokia.com/id/1c82873d-183e-4073-afdb-22e09a5dc8c5/S60_Platform_Localization_Example_v1_0_en.zip.html S60 Platform: Localization Example]

Latest revision as of 08:12, 29 June 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): Nokia E61i
Nokia E90 Communicator
Nokia N95 8GB
Nokia 6220 Classic
Compatibility
Platform(s): S60 3rd Edition, MR
S60 3rd Edition, FP1
S60 3rd Edition, FP2 Beta
S60 3rd Edition (initial release)
Article
Keywords: TLocale, TLocale::FormatCurrency()
Created: tapiolaitinen (04 Mar 2008)
Last edited: hamishwillee (29 Jun 2012)

Contents

[edit] Overview

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.

[edit] Source file

// Buffer for localized text
TBuf<50> myBuf;
 
// 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
TLocale myLocale;
 
// Format currency according to current locale settings
myLocale.FormatCurrency(myBuf, myAmount);

[edit] Postconditions

Currency is formatted according to the locale settings of the device.

[edit] See also

This page was last modified on 29 June 2012, at 08:12.
119 page views in the last 30 days.
×