Localize big number mask
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Localize big number mask

  1. #1
    Join Date
    Aug 2009
    Posts
    78

    Localize big number mask

    Hey
    I have some strings that shows big number.
    I need to add commas to the big numer so for example 9999999 become 9,999,999
    I need it to be localized and I know that some languages uses the char '.' instead of ','
    Any ideas how can I do it ?

    Many thanks

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,524

    Re: Localize big number mask

    Use GetLocaleInfo(Ex) API with LOCALE_SDECIMAL flag.
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2009
    Posts
    78

    Re: Localize big number mask

    Thanks a lot!!

    By the way I needed the flag LOCALE_STHOUSAND.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,524

    Re: Localize big number mask

    Quote Originally Posted by inmar32 View Post
    Thanks a lot!!

    By the way I needed the flag LOCALE_STHOUSAND.
    Yes!
    And sorry for my mistake... (copied from the wrong place of MSDN)
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center