SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Globalization in silk test

    Is there nay function in silk where by it will do the conversion of the number specific to the locale

    say suppose we want to verify that result is 1.1 which will be 1,1 in german locale is there nay utility to do this or will we have to have seperate datasets for each locale?

    ------------------

  2. #2
    Moderator Joe Strazzere's Avatar
    Join Date
    May 2000
    Location
    USA
    Posts
    13,170
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Globalization in silk test

    If you are using Windows, you could call the GetNumberFormat function in kernel32.dll.

    It will give you a number string customized for a specified locale.

    ------------------
    - Joe (strazzerj@aol.com)
    Joe Strazzere
    Visit my website: AllThingsQuality.com to learn more about quality, testing, and QA!

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Globalization in silk test

    I tried following and was not getting the result quite correctly the return values were just 12 or anything before the decimal point.

    have you used this API before am I doing anything wriong?

    here ios what I did:

    [-] testcase NumFormat() appstate none
    [ ] string inp="12.312"
    [ ] string outp
    [ ] NUMBERFMT mylpFormat
    [ ]
    [ ]
    [ ] print(GetNumberFormat(LOCALE_USER_DEFAULT,0,inp,my lpFormat,outp,128))
    [ ] print(mylpFormat)
    [ ] print(outp)
    note I had defined the structure for number format as a record as follows because null was not working.

    [-] type NUMBERFMT is record
    [ ] long NumDigits
    [ ] long LeadingZero
    [ ] long Grouping
    [ ] string lpDecimalSep
    [ ] string lpThousandSep
    [ ] long NegativeOrder



    ------------------

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Globalization in silk test

    never mind I found it out!!
    Thanks anyway

    you have to explicitly set the values in the lpFormat then everythingn is fine for some reason if the number format is defined and the variable is defined as numberformat then you have to set all these values in the structure but if the type of lpFormat is changed to long then the locale specific to that machine is getting pickedup correctly and I would suggest doing it that way as you won't have to worry about knowing what the locale is.

    ------------------

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:44 AM.

Copyright BetaSoft Inc.