Archived:Internationalising real numbers in Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

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
Platform(s): S60 3rd Edition, MR
S60 3rd Edition, FP1
S60 3rd Edition, FP2 Beta
S60 3rd Edition (initial release)
Keywords: TReal, TRealFormat, TBuf::AppendNum()
Created: tapiolaitinen (04 Mar 2008)
Last edited: hamishwillee (29 Jun 2012)



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 a real number according to the locale settings of the device.

Source file

// Buffer for localized text
TBuf<50> myBuf;
// The amount to format
TReal myAmount = 1234.56789;
// Real number formatter, initialized with system's current locale
// settings
TRealFormat myFormat;
// Format the number with the decimal separator setting of the
// current locale
myBuf.AppendNum(myAmount, myFormat);


A real number is formatted according to the locale settings of the device.

See also

This page was last modified on 29 June 2012, at 04:09.
69 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.