×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    11

    Question TTime.Parse() language dependent

    Hi !

    I found out that TTime.parse() is language dependent. Where do I find the 3-letter month names necessary for the parser to work. It works if I replace the 3-letter month-name with numbers. Lets say I have English month names like MAR,MAY or OCT in a descriptor and the mobile is set to another language like spanish, the parser does not work.

    I would expect this information in Developer Library » API Reference » C++ API reference » Date and Time Handling » TTime, but do not find valid month names per language.

    Please help.
    cheers,
    John

  2. #2
    Super Contributor
    Join Date
    Nov 2005
    Location
    London
    Posts
    584

    Re: TTime.Parse() language dependent

    You can get them by using class TMonthNameAbb (in e32std.h):

    http://www.symbian.com/developer/tec...aTMonthNameAbb

    It's a specialised descriptor object. Simply construct it by passing the constructor the month number for which you want to retrieve the abbreviation text.

    TMonthNameAbb march(EMarch);

    The descriptor march will now contained the abbreviated text for the locale of the device.

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    11

    Re: TTime.Parse() language dependent

    Thank you, that helps a bit. But: The time string I receive is always English, the devices use different languages. So I would always need the English abbreviations for parsing the month names. Is it possible to set the parser to English somehow before Parsing?
    cheers,
    John

  4. #4
    Super Contributor
    Join Date
    Nov 2005
    Location
    London
    Posts
    584

    Re: TTime.Parse() language dependent

    I don't think there's a way you can set the locale of the TTime parser.

    If you always receive the string in english, could you perhaps process it to replace the english month abbreviation with the corresponding month number, thus avoiding the problem of attempting to parse it in a different language?

Similar Threads

  1. 5140 3.10: Language in adding words to T9
    By olexa in forum General Development Questions
    Replies: 3
    Last Post: 2004-08-04, 19:29
  2. 3510i, 7210 SDKs language support problem
    By dzaga in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-17, 16:45
  3. Localisation
    By mmalo in forum Symbian
    Replies: 1
    Last Post: 2002-10-02, 07:55

Posting Permissions

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