Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 09:15, 25 March 2008.

CS000856 - I18n: Currency

From Forum Nokia Wiki


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
Category Symbian C++ Subcategory Localization
APIs None Classes TLocale
Methods TLocale::FormatCurrency()    

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.

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);

Postconditions

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

See also

Related Discussions
Thread Thread Starter Forum Replies Last Post
Pjava on the 9210 Communicator quintel PersonalJava 0 2004-06-16 08:27
Reading a multilangual file - A DETAILED SOLUTION + a Hebrew example dd_plus Mobile Java General 13 2007-12-07 11:21
how to create and access resource file in j2me jackofall Mobile Java General 4 2008-02-29 21:48
Ask the Expert: Risalmin on Web Runtime and Flash Nokia Ron Flash Lite on Nokia Devices 0 2008-03-31 18:49
Pjava on the 9210 Communicator quintel Symbian Tools & SDKs 0 2004-06-16 08:30
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX